| 1 | <?php |
||
| 9 | class TemplateRenderer |
||
| 10 | { |
||
| 11 | private $templateInitialization; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Constructor. |
||
| 15 | * |
||
| 16 | * @param TemplateInitialization $templateInitialization TemplateInitialization instance. |
||
| 17 | */ |
||
| 18 | public function __construct(TemplateInitialization $templateInitialization) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Render template |
||
| 25 | * |
||
| 26 | * @param string $migrationName Migration name. |
||
| 27 | * |
||
| 28 | * @return string Rendered tempalte. |
||
| 29 | */ |
||
| 30 | public function render($migrationName) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Get template path. |
||
| 47 | * |
||
| 48 | * @return string Template path. |
||
| 49 | */ |
||
| 50 | private function getTemplatePath() |
||
| 54 | } |
||
| 55 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: