{"record":{"id":"44a52cbbc8a91a7c","repo":"briannesbitt/Carbon","slug":"method-cannot-be-called-on-an-interval-with-a","errorCode":null,"errorMessage":"->$method() cannot be called on an interval with a step","messagePattern":"->\\$method\\(\\) cannot be called on an interval with a step","errorType":"exception","errorClass":"BadMethodCallException","httpStatus":null,"severity":"error","filePath":"src/Carbon/Traits/IntervalStep.php","lineNumber":108,"sourceCode":"        }\n\n        return Carbon::instance($dateTime);\n    }\n\n    private function carbonOrResolve(mixed $dateTime): CarbonInterface\n    {\n        return $dateTime instanceof CarbonInterface\n            ? $dateTime\n            : $this->resolveCarbon($dateTime);\n    }\n\n    private function checkNoStepIsDefined(string $method): void\n    {\n        if ($this->step !== null) {\n            $chunks = explode('::', $method, 2);\n            $method = $chunks[1] ?? $method;\n\n            throw new BadMethodCallException(\n                \"->$method() cannot be called on an interval with a step\",\n            );\n        }\n    }\n}\n","sourceCodeStart":90,"sourceCodeEnd":114,"githubUrl":"https://github.com/briannesbitt/Carbon/blob/b13f05955dcfd7da71d60af745fd148cbdb73505/src/Carbon/Traits/IntervalStep.php#L90-L114","documentation":"Error \"->$method() cannot be called on an interval with a step\" thrown in briannesbitt/Carbon.","triggerScenarios":"Thrown at src/Carbon/Traits/IntervalStep.php:108 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":"b13f05955dcfd7da71d60af745fd148cbdb73505","analyzedAt":"2026-08-17T04:40:56.953Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}