GithubHelp home page GithubHelp logo

_values undefined about phpmetrics HOT 7 CLOSED

tomjn avatar tomjn commented on June 4, 2024
_values undefined

from phpmetrics.

Comments (7)

UFOMelkor avatar UFOMelkor commented on June 4, 2024

Which OS do you use?

from phpmetrics.

Halleck45 avatar Halleck45 commented on June 4, 2024

Which version of PhpMetrics do you use ? (phpmetrics.phar --version)

from phpmetrics.

tomjn avatar tomjn commented on June 4, 2024

OS X 10.9.4

I installed PHPMetrics today within an hour or two of creating the issue:

PhpMetrics, by Jean-François Lépine (https://twitter.com/Halleck45) version 1.0.0

and

PHP 5.4.32 (cli) (built: Aug 26 2014 12:09:27)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

from phpmetrics.

Trismegiste avatar Trismegiste commented on June 4, 2024

I've the same problem on Chrome+Windows :

"Uncaught TypeError: Cannot read property '_values' of undefined"

Only Maintenability and Realtions graphs are ok.

flo@HAL9000 ~/Documents/NetBeansProjects
$ phpmetrics.phar --version
PhpMetrics, by Jean-François Lépine (https://twitter.com/Halleck45) version 1.0.0

flo@HAL9000 ~/Documents/NetBeansProjects
$ php -v
PHP 5.4.3 (cli) (built: May  8 2012 00:51:31)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans

In the same time : it works fine on Chrome+Ubuntu and PHP 5.5

from phpmetrics.

UFOMelkor avatar UFOMelkor commented on June 4, 2024

@Halleck45
Today I had a look at https://peteraba.com/blog/phpmetrics-of-popular-projects/ and discovered that (at least) most of the reports are broken (same error message as above).
It looks like there is a problem with php in the path. Replacing report-tabular.js.twig#L112 with if(!e.name.match(/\.php$/)) { works for me.

@Trismegiste
Might you try #44? How do you execute phpmetrics? Absolute path or relative? With or without trailing slash?

from phpmetrics.

Trismegiste avatar Trismegiste commented on June 4, 2024

Ok guyz' there's definitely a clash between the slash/backslash

What I've tried : (with html report and chrome)

  • in the old windows prompt : php phpmetrics.phar --report-html=toto.html src\ OK ⭕
  • in the old windows prompt : php phpmetrics.phar --report-html=toto.html src OK ⭕
  • in the GIT bash on windows : phpmetrics.phar --report-html=toto.html src OK ⭕
  • in the GIT bash on windows : phpmetrics.phar --report-html=toto.html src/ FAIL ❌
  • on Ubuntu 1404 : everything works fine of course 😆

When it fails, here is chunk of the console output for filename : src/\Visitor\Vertex

There's a slash and a backslash, I think it is the origin of the issue (I have not seen the code so far), just intuition...

Hope this help 🍻

from phpmetrics.

UFOMelkor avatar UFOMelkor commented on June 4, 2024

#44 should fix this problem 😊

from phpmetrics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.