PHPDoc, CS, mistake fixes and other minor improvements

@sandeepone Also need merge to Gleez repo
@sandeepone Please aim for using lower case for NULL, FALSE (TRUE), etc. for accordance with PSR standard.