Halleck45 / DesignPatternDetector

detection of design patterns in PHP code
MIT License
112 stars 14 forks source link

When I run the script it errors out #5

Open ghost opened 7 years ago

ghost commented 7 years ago

PHP Fatal error: Uncaught Error: Call to a member function getType() on string in DesignPatternDetector/vendor/phpmetrics/phpmetrics/src/Hal/Component/OOP/Extractor/Extractor.php:89

gmponos commented 7 years ago

I am having the same issue.

0x9d8e commented 7 years ago

[Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Argument 1 passed to Hal\Component\File\Finder::__construct() m
ust be of the type array, string given, called in /home/ivan/Projects/Desig
nPatternDetector/DesignPatternDetector/src/Hal/Application/Command/RunPatte
rnCommand.php on line 74

dtr0yan commented 7 years ago

Guys, you need to start script by executing next: ./vendor/bin/phpmetrics <path-to-your-code>

vukanac commented 7 years ago

That command does not produce expected output about used design patterns. It should be something like: $ ./bin/design-pattern /projects/project/src/

vukanac commented 7 years ago

With hope to re-alive this repo, I tried to upgrade required libs to the latest, and fix 3 bugs (similar) but have the new one:

Extracting classes
  0/27 [>---------------------------]   0%

  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'Hal\Component\Token\Tokenizer' not found

From phpmetrics Tokenizer is removed.

If someone can say or help with what to change Tokenizer.