1 | <?php |
||
18 | abstract class AbstractGenerator implements GeneratorInterface |
||
19 | { |
||
20 | /* @var Config */ |
||
21 | protected $config; |
||
22 | /* @var PagesCollection */ |
||
23 | protected $pagesCollection; |
||
24 | /* @var $messageCallback */ |
||
25 | protected $messageCallback; |
||
26 | /* @var PagesCollection */ |
||
27 | protected $generatedPages; |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function __construct(Config $config) |
||
39 | |||
40 | /** |
||
41 | * @param PagesCollection $pagesCollection |
||
42 | * @param \Closure $messageCallback |
||
43 | * |
||
44 | * @return PagesCollection |
||
45 | */ |
||
46 | public function runGenerate(PagesCollection $pagesCollection, \Closure $messageCallback): PagesCollection |
||
55 | |||
56 | /** |
||
57 | * Format generator name. |
||
58 | * |
||
59 | * @param self $class |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | protected static function getGeneratorName(self $class): string |
||
67 | } |
||
68 |
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: