pest-plugin-drift icon indicating copy to clipboard operation
pest-plugin-drift copied to clipboard

Argument #2 ($times) must be greater than or equal to 0

Open minasm opened this issue 1 year ago • 2 comments

Wanted to give my tests a drift. After running ./vendor/bin/pest --drift I get the error below after a while.

Then used Pint on my tests folder, and I managed to run ./vendor/bin/pest --drift without issues.

ValueError
str_repeat(): Argument #2 ($times) must be greater than or equal to 0

  at vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php:172
    168▕      * @param int $level Level in number of spaces
    169▕      */
    170▕     protected function setIndentLevel(int $level) {
    171▕         $this->indentLevel = $level;
  ➜ 172▕         $this->nl = "\n" . \str_repeat(' ', $level);
    173▕     }
    174▕
    175▕     /**
    176▕      * Increase indentation level.

minasm avatar Sep 27 '23 21:09 minasm