[REF] simplify CRM_Activity_BAO_Activity function by using early returns.
authoreileen <emcnaughton@wikimedia.org>
Sun, 30 Dec 2018 22:33:12 +0000 (11:33 +1300)
committereileen <emcnaughton@wikimedia.org>
Sun, 30 Dec 2018 22:33:12 +0000 (11:33 +1300)
commitf3b5936071ec32eda96547e3e3dcb186a7c7a495
tree42bd6715511c1109ac4c5ff024c26275104ba35d
parent3e1289c04c563720a36f8daba8b106162d4c8fbb
[REF] simplify CRM_Activity_BAO_Activity function by using early returns.

This function returns a bool. In the process it sets the  variable, however, once set to false in two places
it can never be set to true, so I am simply replacing a big if block with an early return to simplify the code.

This is a further block that can go but it is a slightly different patter & would remove 2 levels of 'if'
so it feels like an easier review if I leave that out of scope
CRM/Activity/BAO/Activity.php