Fixes #6274 added proper support for constants
coding standard fix
#6288 - adding a bit of spacing - helps readability
#6288 - adding spaces around `if` as of PSR-2
#6288 - clarifying on returned indexes
#6288 - adding spacing, avoiding `elseif`
#6288 - more specific parameter hinting for `addConstants`
#6288 - removing useless checks
#6288 - cleanups, removal of unused `empty()` checks
#6288 - cleaning up assertions, using correct assertions for counts, reducing code amount
Merge branch 'hotfix/#6288-fix-#6274-proper-zend-code-constant-support' into develop

Close #6288