1 | <?php |
||
17 | final class RasterImage |
||
18 | { |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | private $id; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | private $width; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | private $height; |
||
33 | |||
34 | /** |
||
35 | * @param ObjectWriter $objectWriter |
||
36 | * @param string $filename |
||
37 | * @param string $pdfVersion |
||
38 | * @param bool $useLossyCompression |
||
39 | * @param int $compressionQuality |
||
40 | * @throws DomainException |
||
41 | * @throws RuntimeException |
||
42 | */ |
||
43 | public function __construct( |
||
99 | |||
100 | /** |
||
101 | * Returns the object number of the imported image. |
||
102 | * |
||
103 | * @return int |
||
104 | */ |
||
105 | public function getId() |
||
109 | |||
110 | /** |
||
111 | * Returns the width of the image in pixels. |
||
112 | * |
||
113 | * @return int |
||
114 | */ |
||
115 | public function getWidth() |
||
119 | |||
120 | /** |
||
121 | * Returns the height of the image in pixels. |
||
122 | * |
||
123 | * @return int |
||
124 | */ |
||
125 | public function getHeight() |
||
129 | |||
130 | /** |
||
131 | * @param bool $useLossyCompression |
||
132 | * @param string $pdfVersion |
||
133 | * @return string |
||
134 | */ |
||
135 | private function determineFilter($useLossyCompression, $pdfVersion) |
||
147 | |||
148 | /** |
||
149 | * Determines the color space of an image. |
||
150 | * |
||
151 | * @param Imagick $image |
||
152 | * @return string |
||
153 | * @throws DomainException |
||
154 | */ |
||
155 | private function determineColorSpace(Imagick $image) |
||
170 | |||
171 | /** |
||
172 | * Creates a shadow mask from an image's alpha channel. |
||
173 | * |
||
174 | * @param ObjectWriter $objectWriter |
||
175 | * @param Imagick $image |
||
176 | * @param string $filter |
||
177 | * @return int |
||
178 | */ |
||
179 | private function createShadowMask(ObjectWriter $objectWriter, Imagick $image, $filter) |
||
204 | |||
205 | /** |
||
206 | * Writes common dictionary entries shared between actual images and their soft masks. |
||
207 | * |
||
208 | * @param ObjectWriter $objectWriter |
||
209 | * @param string $colorSpace |
||
210 | * @param int $length |
||
211 | * @param string $filter |
||
212 | * @param int|null $shadowMaskId |
||
|
|||
213 | */ |
||
214 | private function writeCommonDictionaryEntries(ObjectWriter $objectWriter, $colorSpace, $length, $filter) |
||
240 | |||
241 | /** |
||
242 | * Sets the filter parameters for the image. |
||
243 | * |
||
244 | * @param Imagick $image |
||
245 | * @param string $filter |
||
246 | * @param string $colorSpace |
||
247 | * @param int $compressionQuality |
||
248 | */ |
||
249 | private function setFitlerParameters(Imagick $image, $filter, $colorSpace, $compressionQuality) |
||
274 | } |
||
275 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.