Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | trait TemplateMethods |
||
25 | { |
||
26 | protected ?TemplateEngineInterface $templateEngine = null; |
||
27 | |||
28 | #[Autowire] |
||
29 | public function withTemplateEngine(TemplateEngineInterface $templateEngine): void |
||
30 | { |
||
31 | $this->templateEngine = $templateEngine; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Renders a template with the given data, headers, and status code. |
||
36 | * |
||
37 | * @param string $template The path to the template file. |
||
38 | * @param array<string, mixed> $data The data to be passed to the template. |
||
39 | * @param array<string, string> $headers The headers to be set in the response. |
||
40 | * @param int $statusCode The status code of the response. Defaults to 200. |
||
41 | * |
||
42 | * @return ResponseInterface The rendered template as a response. |
||
43 | */ |
||
44 | protected function render( |
||
52 | } |
||
53 | } |
||
54 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.