pest-plugin-drift
pest-plugin-drift copied to clipboard
Argument #2 ($times) must be greater than or equal to 0
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.