Fixed bug #20307 : PHP_CodeSniffer_Standards_AbstractVariableSniff analyze traits

Needed to also change a File method that was checking if a member var exists inside a class only.