0

PHP Depend と PMD の使用に問題があります。私が使用する場合:

pdepend --summary-xml=/home/<mydirectory>/.sonar/pdepend.xml --suffix=php,php3,php4,php5,phtml,inc /home/<mydirectory>

これは結果です:

解析中
................................................................... .... 1260
.........PHP キャッチ可能な致命的なエラー: PHP_Depend_Parser_UnexpectedTokenException::__construct() に渡される引数 1 は、PHP_Depend_Token のインスタンスでなければなりません。 /usr/share/php/PHP/Depend/Parser.php の 5444 行目および /usr/share/php/PHP/Depend/Parser/UnexpectedTokenException.php の 70 行目で定義 PHP スタック トレース: PHP 1. {main} () /usr/bin/pdepend:0 PHP 2. PHP_Depend_TextUI_Command::main() /usr/bin/pdepend:78 PHP 3. PHP_Depend_TextUI_Command->run() /usr/share/php/PHP/Depend/TextUI/Command .php:679 PHP 4. PHP_Depend_TextUI_Runner->run() /usr/share/php/PHP/Depend/TextUI/Command.php:206 PHP 5. PHP_Depend->analyze() /usr/share/php/PHP/Depend /TextUI/Runner.php:331 PHP 6. PHP_Depend->performParseProcess() /usr/share/php/PHP/Depend.php:306 PHP 7.PHP_Depend_Parser->parse() /usr/share/php/PHP/Depend.php:560 PHP 8. PHP_Depend_Parser->parseOptionalStatement() /usr/share/php/PHP/Depend/Parser.php:370 PHP 9. PHP_Depend_Parser- >parseIfStatement() /usr/share/php/PHP/Depend/Parser.php:5474 PHP 10. PHP_Depend_Parser->parseStatementBody() /usr/share/php/PHP/Depend/Parser.php:3195 PHP 11. PHP_Depend_Parser- >parseStatement() /usr/share/php/PHP/Depend/Parser.php:2320 PHP 12. PHP_Depend_Parser_UnexpectedTokenException->__construct() /usr/share/php/PHP/Depend/Parser.php:5444PHP_Depend_Parser->parseStatementBody() /usr/share/php/PHP/Depend/Parser.php:3195 PHP 11. PHP_Depend_Parser->parseStatement() /usr/share/php/PHP/Depend/Parser.php:2320 PHP 12. PHP_Depend_Parser_UnexpectedTokenException->__construct() /usr/share/php/PHP/Depend/Parser.php:5444PHP_Depend_Parser->parseStatementBody() /usr/share/php/PHP/Depend/Parser.php:3195 PHP 11. PHP_Depend_Parser->parseStatement() /usr/share/php/PHP/Depend/Parser.php:2320 PHP 12. PHP_Depend_Parser_UnexpectedTokenException->__construct() /usr/share/php/PHP/Depend/Parser.php:5444

同じことが次の場合にも起こります。

phpmd /home/<mydirectory> xml /home/<mydirectory>/Sonar_Way_php.xml 

PHP Catchable 致命的エラー: PHP_Depend_Parser_UnexpectedTokenException::__construct() に渡される引数 1 は、PHP_Depend_Token のインスタンスである必要があります。指定された整数は、/usr/share/php/PHP/Depend/Parser.php の 5444 行で呼び出され、/usr/ で定義されています。 share/php/PHP/Depend/Parser/UnexpectedTokenException.php 行 70 PHP スタック トレース:

PHP   1. {main}() /usr/bin/phpmd:0
PHP   2. PHP_PMD_TextUI_Command::main() /usr/bin/phpmd:48
PHP   3. PHP_PMD_TextUI_Command->run() /usr/share/php/PHP/PMD/TextUI/Command.php:151
PHP   4. PHP_PMD->processFiles() /usr/share/php/PHP/PMD/TextUI/Command.php:129
PHP   5. PHP_PMD_Parser->parse() /usr/share/php/PHP/PMD.php:203
PHP   6. PHP_Depend->analyze() /usr/share/php/PHP/PMD/Parser.php:128
PHP   7. PHP_Depend->performParseProcess() /usr/share/php/PHP/Depend.php:306
PHP   8. PHP_Depend_Parser->parse() /usr/share/php/PHP/Depend.php:560
PHP   9. PHP_Depend_Parser->parseOptionalStatement() /usr/share/php/PHP/Depend/Parser.php:370
PHP  10. PHP_Depend_Parser->parseIfStatement() /usr/share/php/PHP/Depend/Parser.php:5474
PHP  11. PHP_Depend_Parser->parseStatementBody() /usr/share/php/PHP/Depend/Parser.php:3195
PHP  12. PHP_Depend_Parser->parseStatement() /usr/share/php/PHP/Depend/Parser.php:2320
PHP  13. PHP_Depend_Parser_UnexpectedTokenException->__construct() /usr/share/php/PHP/Depend/Parser.php:5444

何か提案はありますか?ありがとう。

4

1 に答える 1