Aller au contenu

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.

<?php
class PdfExporter implements Exporter
{
public function export(Report $report): string
{
throw new \RuntimeException('not implemented');
}
}
<?php
class 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.