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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
PhpMetrics v2.4.1 PHP Warning: Division by zero #379
Comments
With my fix (only in PR), there is no more warnings, but I tried to parse an empty folder to reproduice. If your problem is actually PhpMetrics being unable to read your files, could you please share your "src/82files" content? Otherwise, assuming this will be fixed. Thanks a lot. |
This is my src/82files |
I can see that your project only contains PHP snippets without any classes nor any OOP objects. PhpMetrics is intended for projects with usages of packages, namespaces, classes, interfaces, and other structures like that. If this is still a metrics you want to know about your project, I recommend you to use instead phploc from Sebastian Bergmann as it does the exact same thing PhpMetrics can offer you, as long as you don't use classes. If you will to use classes, everything will be fine with PhpMetrics, as the following example shows you: class F019
{
public function __construct()
{
//[Your content of the file in "019" folder here]
}
} Results:
I hope this is clearer for you now 馃槂 Have a nice day. |
@muhagunghidayat I close this issue. Feel free to reopen it if you need more informations :) |
Hi,
Thank you for taking the time to report this bug 馃憤
Run
phpmetrics --version
to get the version of PhpMetrics.The latest version of PhpMetrics is v2.4.1. Please try to update PhpMetrics and check if the bug persist before submitting new issue.
Here is a template for your issue. Please replace the words between braces with the right informations.
Hi,
I've installed PhpMetrics {version} {with composer | as phar archive}.
PhpMetrics v2.4.1 http://www.phpmetrics.org
by Jean-Fran莽ois L茅pine https://twitter.com/Halleck45
When I run this command:
I get this output:
I don't know why phpmetrics cannot analyze my files
Thanks
The text was updated successfully, but these errors were encountered: