1 | <?php |
||
14 | class Sorter extends DataComponent { |
||
15 | |||
16 | const SORTING_SEPARATOR = '~'; |
||
17 | const COLUMN_SEPARATOR = '.'; |
||
18 | |||
19 | /** @var array */ |
||
20 | private $_sortFields = []; |
||
21 | |||
22 | /** |
||
23 | * Sorter constructor. |
||
24 | * @param array $fields |
||
|
|||
25 | * @param bool $remember |
||
26 | */ |
||
27 | 2 | public function __construct(array $fields = null, bool $remember = false) |
|
46 | |||
47 | /** |
||
48 | * @param string $fields |
||
49 | */ |
||
50 | private function _initFields(string $fields) |
||
69 | |||
70 | protected function _readFromSession() |
||
74 | |||
75 | protected function _storeInSession() |
||
79 | |||
80 | 2 | protected function _afterInit() |
|
91 | |||
92 | /** |
||
93 | * @return Builder |
||
94 | */ |
||
95 | 2 | public function shapeData(): Builder |
|
113 | |||
114 | /** |
||
115 | * Sort by this column. |
||
116 | * |
||
117 | * @param string $field |
||
118 | * @param string $direction |
||
119 | * |
||
120 | * @return $this |
||
121 | */ |
||
122 | 1 | public function addField(string $field, string $direction = 'asc') |
|
128 | |||
129 | /** |
||
130 | * Stop sorting by this column |
||
131 | * |
||
132 | * @param string $field |
||
133 | * |
||
134 | * @return $this |
||
135 | */ |
||
136 | public function removeField(string $field) |
||
145 | |||
146 | /** |
||
147 | * @return string |
||
148 | */ |
||
149 | public function render(): string |
||
153 | } |
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.