This is not a good idea.
A brick facade is designed to be a rain and wind screen for the house itself. It is designed with an air space behind the bricks and weeping holes at the bottom to the outside. When the wind hits the wall, it also forces a little air up the weeping holes, creating an almost equal air pressure on both sides of the bricks. This prevents the wind from driving water through the bricks. The building paper on the inner wall sheds any water that manages to get across the gap and directs it down and out the weep holes. The presence of a vented air gap is an integral part of how a brick facade protects a house from rain and wind.
The air space is irregular and very difficult to fill properly with insulation anyway. Foam shot into this cavity can produce a moisture barrier where it could cause a lot of condensation if it does not fill the requirement of being twice as much thermal resistance as all the rest of the insulation in the wall (the 1/3 -- 2/3 rule -- WHERE IS A VAPOUR BARRIER TO BE PLACED?) If the insulation fails to completely fill absolutely every part of the cavity, the gaps will direct water right into the house. Polyurethane foam tends to expand if wet and hot, which could throw the whole brick wall forward into the flower patch.
In sum, not a very good idea when the most you could gain anyway is a half inch or so of insulation.