1 | <?php |
||
21 | trait OutputTrait |
||
22 | { |
||
23 | /** |
||
24 | * Output logs. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | private $logs = []; |
||
29 | |||
30 | /** |
||
31 | * Settings. |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | private $settings = []; |
||
36 | |||
37 | /** |
||
38 | * Create new output instance |
||
39 | * with viewport size set. |
||
40 | * |
||
41 | * @param \JonnyW\PhantomJs\Page\ViewportSize $size |
||
42 | * |
||
43 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
44 | */ |
||
45 | public function withViewportSize(ViewportSize $size) |
||
52 | |||
53 | /** |
||
54 | * Create new output instance |
||
55 | * and unset viewport size. |
||
56 | * |
||
57 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
58 | */ |
||
59 | public function withoutViewportSize() |
||
67 | |||
68 | /** |
||
69 | * Get viewport size. |
||
70 | * |
||
71 | * @return \JonnyW\PhantomJs\Page\ViewportSize |
||
72 | */ |
||
73 | public function getViewportSize() |
||
77 | |||
78 | /** |
||
79 | * Create new output instance |
||
80 | * with paper size set. |
||
81 | * |
||
82 | * @param \JonnyW\PhantomJs\Page\PaperSize $size |
||
83 | * |
||
84 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
85 | */ |
||
86 | public function withPaperSize(PaperSize $size) |
||
93 | |||
94 | /** |
||
95 | * Create new output instance |
||
96 | * and unset paper size. |
||
97 | * |
||
98 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
99 | */ |
||
100 | public function withoutPaperSize() |
||
108 | |||
109 | /** |
||
110 | * Get paper size. |
||
111 | * |
||
112 | * @return \JonnyW\PhantomJs\Page\PaperSize |
||
113 | */ |
||
114 | public function getPaperSize() |
||
118 | |||
119 | /** |
||
120 | * Create new output instance |
||
121 | * with zoom factor set. |
||
122 | * |
||
123 | * @param \JonnyW\PhantomJs\Page\ZoomFactor $zoom |
||
124 | * |
||
125 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
126 | */ |
||
127 | public function withZoomFactor(ZoomFactor $zoom) |
||
134 | |||
135 | /** |
||
136 | * Create new output instance |
||
137 | * and unset zoom factor. |
||
138 | * |
||
139 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
140 | */ |
||
141 | public function withoutZoomFactor() |
||
149 | |||
150 | /** |
||
151 | * Get zoom factor. |
||
152 | * |
||
153 | * @return \JonnyW\PhantomJs\Page\ZoomFactor |
||
154 | */ |
||
155 | public function getZoomFactor() |
||
159 | |||
160 | /** |
||
161 | * Create new output instance |
||
162 | * with clip rect set. |
||
163 | * |
||
164 | * @param \JonnyW\PhantomJs\Page\ClipRect $zoom |
||
165 | * |
||
166 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
167 | */ |
||
168 | public function withClipRect(ClipRect $zoom) |
||
175 | |||
176 | /** |
||
177 | * Create new output instance |
||
178 | * and unset clip rect. |
||
179 | * |
||
180 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
181 | */ |
||
182 | public function withoutClipRect() |
||
190 | |||
191 | /** |
||
192 | * Get clip rect. |
||
193 | * |
||
194 | * @return \JonnyW\PhantomJs\Page\ClipRect |
||
195 | */ |
||
196 | public function getClipRect() |
||
200 | |||
201 | /** |
||
202 | * Create new output instance |
||
203 | * with log entry added. |
||
204 | * |
||
205 | * @param string $line |
||
|
|||
206 | * |
||
207 | * @return \JonnyW\PhantomJs\IO\OutputInterface |
||
208 | */ |
||
209 | public function withLog($entry) |
||
216 | |||
217 | /** |
||
218 | * Get log data. |
||
219 | * |
||
220 | * @return array |
||
221 | */ |
||
222 | public function getLogs() |
||
226 | } |
||
227 |
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.