1 | <?php |
||
17 | class ActionRegistry implements ActionInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var \eZ\Publish\Core\MVC\ConfigResolverInterface |
||
21 | */ |
||
22 | protected $configResolver; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $actions; |
||
28 | |||
29 | /** |
||
30 | * @var \Psr\Log\LoggerInterface |
||
31 | */ |
||
32 | protected $logger; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | protected $debug = false; |
||
38 | |||
39 | /** |
||
40 | * ActionAggregate constructor. |
||
41 | * |
||
42 | * @param array $config |
||
|
|||
43 | * @param LoggerInterface $logger |
||
44 | */ |
||
45 | public function __construct(iterable $actions, ConfigResolverInterface $configResolver, LoggerInterface $logger) |
||
52 | |||
53 | public function act(InformationCollected $event): void |
||
76 | |||
77 | /** |
||
78 | * Sets debug variable based on kernel.debug param. |
||
79 | * |
||
80 | * @param bool $debug |
||
81 | */ |
||
82 | public function setDebug($debug) |
||
86 | |||
87 | /** |
||
88 | * Check if given action can act. |
||
89 | * |
||
90 | * @param ActionInterface $action |
||
91 | * @param array $config |
||
92 | * |
||
93 | * @return bool |
||
94 | */ |
||
95 | protected function canActionAct(ActionInterface $action, array $config): bool |
||
99 | |||
100 | /** |
||
101 | * Returns configuration for given content type identifier if exists |
||
102 | * or default one. |
||
103 | * |
||
104 | * @param string $contentTypeIdentifier |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | protected function prepareConfig($contentTypeIdentifier): array |
||
120 | } |
||
121 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.