Arbitrary ternary operator change

Please check this code carefully as this is my first PR following the contributors guide.

I have run phpunit ZendTest/EventManager and it reports:

OK, but incomplete or skipped tests!
Tests: 88, Assertions: 228, Skipped: 1.