Reduced complexity and shorten long method

Related to https://scrutinizer-ci.com/g/phpDocumentor/phpDocumentor2/code-structure/develop/operation/phpDocumentor%5CDescriptor%5CFileDescriptor%3A%3AgetAllErrors