Reduced complexity and shorten long method

Related to https://scrutinizer-ci.com/g/phpDocumentor/phpDocumentor2/code-structure/develop/operation/phpDocumentor%5CDescriptor%5CFileDescriptor%3A%3AgetAllErrors
Update FileDescriptor.php
take a more descriptive name
removed unused imports and added some more docblock annotations
Merge pull request #1175 from siad007/patch-21

Reduced complexity and shorten long method
Merge pull request #1166 from siad007/patch-13

Removed unused import