1 | <?php |
||
14 | class Cell |
||
15 | { |
||
16 | /** |
||
17 | * Numeric cell type (whole numbers, fractional numbers, dates) |
||
18 | */ |
||
19 | const TYPE_NUMERIC = 0; |
||
20 | |||
21 | /** |
||
22 | * String (text) cell type |
||
23 | */ |
||
24 | const TYPE_STRING = 1; |
||
25 | |||
26 | /** |
||
27 | * Formula cell type |
||
28 | * Not used at the moment |
||
29 | */ |
||
30 | const TYPE_FORMULA = 2; |
||
31 | |||
32 | /** |
||
33 | * Empty cell type |
||
34 | */ |
||
35 | const TYPE_EMPTY = 3; |
||
36 | |||
37 | /** |
||
38 | * Boolean cell type |
||
39 | */ |
||
40 | const TYPE_BOOLEAN = 4; |
||
41 | |||
42 | /** |
||
43 | * Error cell type |
||
44 | */ |
||
45 | const TYPE_ERROR = 5; |
||
46 | |||
47 | /** |
||
48 | * The value of this cell |
||
49 | * @var mixed|null |
||
50 | */ |
||
51 | protected $value = null; |
||
52 | |||
53 | /** |
||
54 | * The cell type |
||
55 | * @var int|null |
||
56 | */ |
||
57 | protected $type = null; |
||
58 | |||
59 | /** |
||
60 | * The cell style |
||
61 | * @var Style|null |
||
62 | */ |
||
63 | protected $style = null; |
||
64 | |||
65 | /** |
||
66 | * @var StyleMerger |
||
67 | */ |
||
68 | protected $styleMerger; |
||
69 | |||
70 | /** |
||
71 | * Cell constructor. |
||
72 | * @param $value mixed |
||
73 | * @param $style Style |
||
74 | */ |
||
75 | 91 | public function __construct($value, Style $style = null) |
|
84 | |||
85 | /** |
||
86 | * @param $value mixed|null |
||
87 | */ |
||
88 | 91 | public function setValue($value) |
|
93 | |||
94 | /** |
||
95 | * @return mixed|null |
||
96 | */ |
||
97 | 88 | public function getValue() |
|
101 | |||
102 | /** |
||
103 | * @param Style $style |
||
104 | */ |
||
105 | 67 | public function setStyle(Style $style) |
|
109 | |||
110 | /** |
||
111 | * @return Style |
||
112 | */ |
||
113 | 66 | public function getStyle() |
|
120 | |||
121 | /** |
||
122 | * @return int|null |
||
123 | */ |
||
124 | public function getType() |
||
128 | |||
129 | /** |
||
130 | * Get the current value type |
||
131 | * @param mixed|null $value |
||
132 | * @return int |
||
133 | */ |
||
134 | 91 | protected function detectType($value) |
|
148 | |||
149 | /** |
||
150 | * @return bool |
||
151 | */ |
||
152 | 13 | public function isBoolean() |
|
156 | |||
157 | /** |
||
158 | * @return bool |
||
159 | */ |
||
160 | 24 | public function isEmpty() |
|
164 | |||
165 | /** |
||
166 | * Not used at the moment |
||
167 | * @return bool |
||
168 | */ |
||
169 | public function isFormula() |
||
173 | |||
174 | /** |
||
175 | * @return bool |
||
176 | */ |
||
177 | 12 | public function isNumeric() |
|
181 | |||
182 | /** |
||
183 | * @return bool |
||
184 | */ |
||
185 | 67 | public function isString() |
|
189 | |||
190 | /** |
||
191 | * @return bool |
||
192 | */ |
||
193 | 1 | public function isError() |
|
197 | |||
198 | /** |
||
199 | * @return string |
||
200 | */ |
||
201 | 8 | public function __toString() |
|
205 | |||
206 | /** |
||
207 | * @param Style $style|null |
||
|
|||
208 | * @return $this |
||
209 | */ |
||
210 | 64 | public function applyStyle(Style $style = null) |
|
219 | } |
||
220 |
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.