codeclimate / codeclimate-phpmd

Code Climate PHPMD Engine
MIT License
10 stars 12 forks source link

all error in output #33

Open eidng8 opened 7 years ago

eidng8 commented 7 years ago

I've got errors on every build:

PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Undefined variable: type in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php on line 5521
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to PDepend\Source\AST\AbstractASTCallable::addChild() must implement interface PDepend\Source\AST\ASTNode, null given, called in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/PHPParserVersion70.php on line 97 and defined in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/AbstractASTCallable.php:143
Stack trace:
#0 /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/PHPParserVersion70.php(97): PDepend\Source\AST\AbstractASTCallable->addChild(NULL)
#1 /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php(1228): PDepend\Source\Language\PHP\PHPParserVersion70->parseCallableDeclarationAddition(Object(PDepend\Source\AST\ASTMethod))
#2 /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php(1185): PDepend\Source\Language\PHP\AbstractPHPParser->parseCallableDeclaration(Object(PDepend\Source\AST\ASTMethod))
#3 /usr/src/ in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/AbstractASTCallable.php on line 143
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Only variables should be passed by reference in /usr/src/app/Category.php on line 70
PHP Notice:  Undefined variable: type in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php on line 5521
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to PDepend\Source\AST\AbstractASTCallable::addChild() must implement interface PDepend\Source\AST\ASTNode, null given, called in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/PHPParserVersion70.php on line 97 and defined in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/AbstractASTCallable.php:143
Stack trace:
#0 /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/PHPParserVersion70.php(97): PDepend\Source\AST\AbstractASTCallable->addChild(NULL)
#1 /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php(1228): PDepend\Source\Language\PHP\PHPParserVersion70->parseCallableDeclarationAddition(Object(PDepend\Source\AST\ASTMethod))
#2 /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/AbstractPHPParser.php(1185): PDepend\Source\Language\PHP\AbstractPHPParser->parseCallableDeclaration(Object(PDepend\Source\AST\ASTMethod))
#3 /usr/src/ in /usr/src/app/vendor/pdepend/pdepend/src/main/php/PDepend/Source/AST/AbstractASTCallable.php on line 143
maxjacobson commented 7 years ago

Thanks for the report. I've just shipped an update which ought to avoid the noisy "Only variables..." output, but may otherwise not fix your repo. If you're able to share an OSS reproduction case, we can dig into any remaining errors that may exist, just let us know.

eidng8 commented 7 years ago

The repo is open, https://github.com/eidng8/sttbot

The log is still spammed.

BTW, it's using PHP 7.1, and it seems you are using PHP 7.0 parser. Also tools such as phpcs don't quite well working on PHP 7.1 either.