How you garden shouldn't have an effect on your rat population. Rats to perfectly well in the urban areas without a speck of green and are very rare in the rural areas with lots of green. Rats benefit from human made structures and human provided food.
You need to find where they are entering the garage and seal it up. It may seem hard but thats the only way you will win the battle.
That will keep them out but the population needs food so there must be a source (garbage, cat/dog food, birdseed) somewhere nearby. If you are in an urban or suburban area then the trash and litter from others will freed them plenty and the outside population will always be there. If you have log or brush piles in the garden for wildlife then yes, those could provide shelter for rats so it would be good to remove them but rats still need food (and they don't eat your flowers). Remove all piles of anything from around your garage will help reduce the shelter they have but sealing the holes up is really the only way (unless you see your whole neighborhood joining together to keep all garbage tightly sealed and properly placed in garbage cans and not leaving any birdseed out or cat food or anything?)