DesignPatternDetector icon indicating copy to clipboard operation
DesignPatternDetector copied to clipboard

When I run the script it errors out

Open ghost opened this issue 7 years ago • 5 comments

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

ghost avatar Nov 21 '16 00:11 ghost

I am having the same issue.

gmponos avatar Dec 07 '16 07:12 gmponos

[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

0x9d8e avatar Apr 18 '17 10:04 0x9d8e

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

dtr0yan avatar May 05 '17 14:05 dtr0yan

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

vukanac avatar May 17 '17 19:05 vukanac

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.

vukanac avatar May 17 '17 21:05 vukanac