* Add PHP type hints where possible.
* Remove @var, @param and @return if redundant to type declaration.
* Use explite type cast to int for boolean array index.
Change-Id: I3531b3f735327b5c427f1fc434adfb495b1c743f
Had to change a bit how ExprError is used, to prevent having to turn unit
tests into ingergation tests, adding 5 seconds to run time.
Change-Id: Id4e158f3a4418d320b1c0bdac834ebbba03762af