1 | <?php |
||
16 | class CaptchaService implements CaptchaServiceInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $config; |
||
22 | |||
23 | /** |
||
24 | * @var \eZ\Publish\API\Repository\ContentTypeService |
||
25 | */ |
||
26 | protected $contentTypeService; |
||
27 | /** |
||
28 | * @var ConfigResolverInterface |
||
29 | */ |
||
30 | private $configResolver; |
||
31 | |||
32 | /** |
||
33 | * CaptchaService constructor. |
||
34 | * |
||
35 | * @param \eZ\Publish\API\Repository\ContentTypeService $contentTypeService |
||
36 | * @param array $config |
||
|
|||
37 | */ |
||
38 | public function __construct(ContentTypeService $contentTypeService, ConfigResolverInterface $configResolver) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function isEnabled(Location $location): bool |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function getSiteKey(Location $location): string |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function getCaptcha(Location $location): CaptchaValue |
||
99 | |||
100 | /** |
||
101 | * Returns filtered config for current Location. |
||
102 | * |
||
103 | * @param \eZ\Publish\API\Repository\Values\Content\Location $location |
||
104 | * |
||
105 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException |
||
106 | * |
||
107 | * @return array |
||
108 | */ |
||
109 | public function getConfig(Location $location): array |
||
117 | |||
118 | /** |
||
119 | * Returns filtered config for current ContentType. |
||
120 | * |
||
121 | * @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType |
||
122 | * |
||
123 | * @return array |
||
124 | */ |
||
125 | protected function getConfigForContentType(ContentType $contentType) |
||
133 | |||
134 | /** |
||
135 | * Checks if override exist for given ContentType. |
||
136 | * |
||
137 | * @param \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType |
||
138 | * |
||
139 | * @return bool |
||
140 | */ |
||
141 | protected function hasConfigForContentType(ContentType $contentType) |
||
151 | |||
152 | /** |
||
153 | * Helper method for retrieving ContentType from Location. |
||
154 | * |
||
155 | * @param \eZ\Publish\API\Repository\Values\Content\Location $location |
||
156 | * |
||
157 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException |
||
158 | * |
||
159 | * @return \eZ\Publish\API\Repository\Values\ContentType\ContentType |
||
160 | */ |
||
161 | protected function getContentType(Location $location) |
||
166 | } |
||
167 |
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.