Not implemented stub (ARCH7191)
Ce contenu n’est pas encore disponible dans votre langue.
Key php.quality.not-implemented-stub · Severity warning · Category quality
“Not implemented” exceptions or placeholders left on production paths cause unexpected runtime failures. Finish the stub.
Incorrect
Section titled “Incorrect”<?phpclass PdfExporter implements Exporter{ public function export(Report $report): string { throw new \RuntimeException('not implemented'); }}Correct
Section titled “Correct”<?phpclass PdfExporter implements Exporter{ public function export(Report $report): string { return $this->renderer->render($report->toView()); }}Complete the stub body with a real implementation, or remove the type from shippable code.