1 | <?php |
||
10 | class Field |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $header; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $name; |
||
21 | |||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | private $sort; |
||
26 | |||
27 | /** |
||
28 | * @var string|null |
||
29 | */ |
||
30 | private $template; |
||
31 | |||
32 | /** |
||
33 | * @var FieldAlias|null |
||
34 | */ |
||
35 | private $alias; |
||
36 | |||
37 | /** |
||
38 | * @param string $name The name |
||
39 | * @param string $header The header |
||
40 | * @param bool $sort Sort or not |
||
41 | * @param string $template The template |
||
|
|||
42 | * @param FieldAlias $alias The alias |
||
43 | */ |
||
44 | 20 | public function __construct($name, $header, $sort = false, $template = null, FieldAlias $alias = null) |
|
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | 5 | public function getName() |
|
60 | |||
61 | /** |
||
62 | * @return string |
||
63 | */ |
||
64 | 3 | public function getHeader() |
|
68 | |||
69 | /** |
||
70 | * @return bool |
||
71 | */ |
||
72 | 5 | public function isSortable() |
|
76 | |||
77 | /** |
||
78 | * @return string |
||
79 | */ |
||
80 | 3 | public function getTemplate() |
|
84 | |||
85 | /** |
||
86 | * @return FieldAlias|null |
||
87 | */ |
||
88 | 2 | public function getAlias() |
|
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | 1 | public function hasAlias() |
|
104 | |||
105 | 1 | public function getAliasObj($item) |
|
116 | |||
117 | 1 | public function getColumnName($column) |
|
129 | } |
||
130 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.