little code improvements and performance improvements
Merge branch 'cs/#6953-code-quality-improvements'

Close #6953
PHPCS fixes for Zend\File