imanghafoori1 / laravel-microscope

Fearless refactoring, it does a lot of smart checks to find certain errors.
MIT License
1.48k stars 96 forks source link

Bug fix from reporter #276

Closed alikhosravidev closed 10 months ago

alikhosravidev commented 10 months ago
 str_repeat(): Argument #2 ($times) must be greater than or equal to 0

  at laravel-microscope/src/Features/CheckImports/CheckImportReporter.php:112
    108▕         foreach ($psr4 as $psr4Namespace => $psr4Paths) {
    109▕             foreach ($psr4Paths as $path => $countClasses) {
    110▕                 $countClasses = str_pad((string) $countClasses, 3, ' ', STR_PAD_LEFT);
    111▕                 $len = strlen($psr4Namespace);
  ➜ 112▕                 $result .= self::hyphen().''.$psr4Namespace.str_repeat(' ', $spaces - $len).' ';
    113▕                 $result .= " $countClasses file".($countClasses == 1 ? '' : 's').' found (./'.$path.")\n";
    114▕             }
    115▕         }
    116▕ 

  1   laravel-microscope/src/Features/CheckImports/CheckImportReporter.php:112

  2   laravel-microscope/src/Features/CheckImports/CheckImportReporter.php:90
      Imanghafoori\LaravelMicroscope\Features\CheckImports\CheckImportReporter::formatPsr4Stats()