1 | <?php |
||
17 | class ImageRenderer implements InlineRendererInterface |
||
18 | { |
||
19 | /** |
||
20 | * Image caption renderer |
||
21 | * |
||
22 | * @var ImageCaptionRenderer |
||
23 | */ |
||
24 | private $captionRenderer; |
||
25 | |||
26 | /** |
||
27 | * Url Translation |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | private $urlTranslation; |
||
32 | |||
33 | /** |
||
34 | * Images base url |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | private $imagesBaseUrl; |
||
39 | |||
40 | /** |
||
41 | * Images config |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | private $imagesConfig; |
||
46 | |||
47 | /** |
||
48 | * Constructor |
||
49 | * |
||
50 | * @param ImageCaptionRenderer $imageCaptionRenderer |
||
|
|||
51 | * @param array $urlTranslation |
||
52 | * @param string $imagesBaseUrl |
||
53 | * @param array $imagesConfig |
||
54 | */ |
||
55 | public function __construct(ImageCaptionRenderer $captionRenderer, array $urlTranslation, string $imagesBaseUrl, |
||
63 | |||
64 | /** |
||
65 | * Get caption renderer |
||
66 | * |
||
67 | * @return ImageCaptionRenderer |
||
68 | */ |
||
69 | public function getCaptionRenderer() : ImageCaptionRenderer |
||
73 | |||
74 | /** |
||
75 | * Get url translation |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | public function getUrlTranslation() : array |
||
83 | |||
84 | /** |
||
85 | * Get images base url |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getImagesBaseUrl() : string |
||
93 | |||
94 | /** |
||
95 | * Get images config |
||
96 | * |
||
97 | * @return array |
||
98 | */ |
||
99 | public function getImagesConfig() : array |
||
103 | |||
104 | /** |
||
105 | * Render image |
||
106 | * |
||
107 | * {@inheritDoc} |
||
108 | * @see \League\CommonMark\Inline\Renderer\InlineRendererInterface::render() |
||
109 | */ |
||
110 | public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer) |
||
136 | } |
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.