1 | <?php |
||
10 | class Item |
||
11 | { |
||
12 | /** |
||
13 | * @var integer |
||
14 | */ |
||
15 | private $originalWidth; |
||
16 | |||
17 | /** |
||
18 | * @var integer |
||
19 | */ |
||
20 | private $originalHeight; |
||
21 | |||
22 | /** |
||
23 | * @var float|integer |
||
24 | */ |
||
25 | private $width; |
||
26 | |||
27 | /** |
||
28 | * @var float|integer |
||
29 | */ |
||
30 | private $height; |
||
31 | |||
32 | /** |
||
33 | * @var mixed |
||
34 | */ |
||
35 | private $content; |
||
36 | |||
37 | /** |
||
38 | * @param string $url |
||
|
|||
39 | * @param integer $width |
||
40 | * @param integer $height |
||
41 | * @param mixed $content |
||
42 | */ |
||
43 | 1 | function __construct($width, $height, $content = null) { |
|
48 | |||
49 | /** |
||
50 | * @return float|integer |
||
51 | */ |
||
52 | 3 | public function getWidth() |
|
56 | |||
57 | /** |
||
58 | * @return float|integer |
||
59 | */ |
||
60 | 3 | public function getHeight() |
|
64 | |||
65 | /** |
||
66 | * @param float $total |
||
67 | * @return float |
||
68 | */ |
||
69 | 1 | public function getWidthPercent($total) |
|
73 | |||
74 | /** |
||
75 | * @param float $total |
||
76 | * @return float |
||
77 | */ |
||
78 | 1 | public function getHeightPercent($total) |
|
82 | |||
83 | /** |
||
84 | * set width, keeping aspect ratio |
||
85 | * |
||
86 | * @param integer $width |
||
87 | */ |
||
88 | 1 | public function setWidth($width) |
|
93 | |||
94 | /** |
||
95 | * set height, keeping aspect ratio |
||
96 | * |
||
97 | * @param integer $height |
||
98 | */ |
||
99 | 1 | public function setHeight($height) |
|
104 | |||
105 | /** |
||
106 | * @return float |
||
107 | */ |
||
108 | 2 | public function getScale() |
|
112 | |||
113 | /** |
||
114 | * @return integer |
||
115 | */ |
||
116 | 3 | public function getOriginalWidth() |
|
120 | |||
121 | /** |
||
122 | * @return integer |
||
123 | */ |
||
124 | 3 | public function getOriginalHeight() |
|
128 | |||
129 | /** |
||
130 | * @return float |
||
131 | */ |
||
132 | 1 | public function getAspect() |
|
136 | |||
137 | /** |
||
138 | * @return boolean |
||
139 | */ |
||
140 | 3 | public function isLandscape() |
|
144 | |||
145 | /** |
||
146 | * @return boolean |
||
147 | */ |
||
148 | 3 | public function isPortrait() |
|
152 | |||
153 | /** |
||
154 | * @return boolean |
||
155 | */ |
||
156 | 3 | public function isSquare() |
|
160 | |||
161 | /** |
||
162 | * @return string |
||
163 | */ |
||
164 | 1 | public function getContent() |
|
168 | |||
169 | 1 | public function __toString() |
|
173 | } |
||
174 |
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.