{"record":{"id":"b1f5904796fda6d0","repo":"pestphp/pest","slug":"the-number-of-repetitions-must-be-greater-than-0","errorCode":null,"errorMessage":"The number of repetitions must be greater than 0.","messagePattern":"The number of repetitions must be greater than 0\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/PendingCalls/TestCall.php","lineNumber":335,"sourceCode":"    public function onlyOnWindows(): self\n    {\n        return $this->skipOnMac()->skipOnLinux();\n    }\n\n    public function onlyOnMac(): self\n    {\n        return $this->skipOnWindows()->skipOnLinux();\n    }\n\n    public function onlyOnLinux(): self\n    {\n        return $this->skipOnWindows()->skipOnMac();\n    }\n\n    public function repeat(int $times): self\n    {\n        if ($times < 1) {\n            throw new InvalidArgumentException('The number of repetitions must be greater than 0.');\n        }\n\n        $this->testCaseMethod->repetitions = $times;\n\n        return $this;\n    }\n\n    public function flaky(int $tries = 3): self\n    {\n        if ($tries < 1) {\n            throw new InvalidArgumentException('The number of tries must be greater than 0.');\n        }\n\n        $this->testCaseMethod->flakyTries = $tries;\n\n        return $this;\n    }\n","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/pestphp/pest/blob/1af74a215c3a89bc7a44fc6f9322e369eaad2423/src/PendingCalls/TestCall.php#L317-L353","documentation":"Error \"The number of repetitions must be greater than 0.\" thrown in pestphp/pest.","triggerScenarios":"Thrown at src/PendingCalls/TestCall.php:335 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1af74a215c3a89bc7a44fc6f9322e369eaad2423","analyzedAt":"2026-08-21T02:16:38.132Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}