1 | <?php |
||
10 | class ImageGenerator |
||
11 | { |
||
12 | /** |
||
13 | * @var Server |
||
14 | */ |
||
15 | private $server; |
||
16 | |||
17 | /** |
||
18 | * @var FilenameGeneratorInterface |
||
19 | */ |
||
20 | private $filenameGenerator; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private $defaultImageParameters; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $tmpPath; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $tmpPrefix; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | private $fallbackImage; |
||
41 | |||
42 | /** |
||
43 | * @param Server $server |
||
44 | * @param FilenameGeneratorInterface $filenameGenerator |
||
45 | * @param array $defaultImageParameters |
||
46 | * @param null $fallbackImage |
||
47 | * @param null $tmpPath |
||
48 | * @param null $tmpPrefix |
||
49 | */ |
||
50 | 6 | public function __construct( |
|
65 | |||
66 | /** |
||
67 | * @param MediaInterface $media |
||
68 | * @param ImageParameterBag $parameterBag |
||
69 | * @return mixed |
||
70 | */ |
||
71 | 5 | public function generate(MediaInterface $media, ImageParameterBag $parameterBag) |
|
86 | |||
87 | /** |
||
88 | * @param MediaInterface $media |
||
89 | * @param ImageParameterBag $parameterBag |
||
90 | * @param $filename |
||
91 | * @throws FilesystemException |
||
92 | * @throws \Exception |
||
93 | */ |
||
94 | 4 | protected function generateImage(MediaInterface $media, ImageParameterBag $parameterBag, $filename) |
|
115 | |||
116 | /** |
||
117 | * @param MediaInterface $media |
||
118 | * @return string |
||
119 | * @throws FilesystemException |
||
120 | */ |
||
121 | 4 | protected function getImageData(MediaInterface $media) |
|
133 | |||
134 | /** |
||
135 | * @param MediaInterface $media |
||
136 | * @param string $tmp |
||
137 | * @param ImageParameterBag $parameterBag |
||
138 | * @return string |
||
139 | */ |
||
140 | 3 | protected function doGenerateImage(MediaInterface $media, $tmp, ImageParameterBag $parameterBag) |
|
148 | |||
149 | /** |
||
150 | * @return string |
||
151 | */ |
||
152 | 4 | protected function getTemporaryFile() |
|
163 | |||
164 | /** |
||
165 | * @return Server |
||
166 | */ |
||
167 | 1 | public function getServer() |
|
171 | |||
172 | /** |
||
173 | * @return FilenameGeneratorInterface |
||
174 | */ |
||
175 | 1 | public function getFilenameGenerator() |
|
179 | |||
180 | /** |
||
181 | * @return array |
||
182 | */ |
||
183 | 1 | public function getDefaultImageParameters() |
|
187 | |||
188 | /** |
||
189 | * @return string |
||
190 | */ |
||
191 | 1 | public function getTmpPath() |
|
195 | |||
196 | /** |
||
197 | * @return string |
||
198 | */ |
||
199 | 1 | public function getTmpPrefix() |
|
203 | |||
204 | /** |
||
205 | * @return string |
||
206 | */ |
||
207 | 1 | public function getFallbackImage() |
|
211 | } |
||
212 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.