-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closure detected instead of method && Fatal Error #33
Comments
Hi. Can you copy-paste here the details of exception ? |
Hi, yes. This happens while analyzing https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Utility/GeneralUtility.php [Exception] Closure detected instead of method Exception trace: () at /home/susanne/.composer/vendor/halleck45/phpmetrics/src/Hal/Component/OOP/Extractor/MethodExtractor.php:50 Hal\Component\OOP\Extractor\MethodExtractor->extract() at /home/susanne/.composer/vendor/halleck45/phpmetrics/src/Hal/Component/OOP/Extractor/Extractor.php:123 Hal\Component\OOP\Extractor\Extractor->extract() at /home/susanne/.composer/vendor/halleck45/phpmetrics/src/Hal/Application/Command/Job/Analyze/FileAnalyzer.php:137 Hal\Application\Command\Job\Analyze\FileAnalyzer->execute() at /home/susanne/.composer/vendor/halleck45/phpmetrics/src/Hal/Application/Command/Job/DoAnalyze.php:120 Hal\Application\Command\Job\DoAnalyze->execute() at /home/susanne/.composer/vendor/halleck45/phpmetrics/src/Hal/Application/Command/Job/Queue.php:51 Hal\Application\Command\Job\Queue->execute() at /home/susanne/.composer/vendor/halleck45/phpmetrics/src/Hal/Application/Command/RunMetricsCommand.php:114 Hal\Application\Command\RunMetricsCommand->execute() at /home/susanne/.composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241 Symfony\Component\Console\Command\Command->run() at /home/susanne/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:885 Symfony\Component\Console\Application->doRunCommand() at /home/susanne/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:191 Symfony\Component\Console\Application->doRun() at /home/susanne/.composer/vendor/symfony/console/Symfony/Component/Console/Application.php:121 Symfony\Component\Console\Application->run() at /home/susanne/.composer/vendor/halleck45/phpmetrics/bin/metrics.php:22 |
This bug occurs when file is too big to fit in memory. Tokenizer splits file into multiple subfiles, and bugs can occurs. I think that fixing this bug is not possible : only a human can cut code safely. In your case, you can split |
Hi,
trying to run phpMetrics on https://github.com/TYPO3/TYPO3.CMS I get:
[Exception]
Closure detected instead of method
Trying to run metrics without oop (--without-oop) the analysis runs but then I get a fatal error:
Anything I'm doing wrong?
Thanks,
susanne
The text was updated successfully, but these errors were encountered: