1 | <?php |
||
13 | abstract class Column implements ColumnInterface, Arrayable, Jsonable, JsonSerializable |
||
14 | { |
||
15 | protected $name; |
||
16 | |||
17 | protected $label; |
||
18 | |||
19 | protected $width = 0; |
||
20 | |||
21 | protected $minWidth = 80; |
||
22 | |||
23 | protected $sortable = false; |
||
24 | |||
25 | protected $fixed = false; |
||
26 | |||
27 | protected $model; |
||
28 | |||
29 | protected $template = '<span>{{value}}</span>'; |
||
30 | |||
31 | public function __construct($name, $label) |
||
36 | |||
37 | public function getName() |
||
41 | |||
42 | public function setWidth($width) |
||
48 | |||
49 | public function setMinWidth($width) |
||
55 | |||
56 | public function isSortable() |
||
62 | |||
63 | public function isCustomSortable() |
||
71 | |||
72 | public function isFixed() |
||
78 | |||
79 | public function getModel() |
||
83 | |||
84 | public function setModel(Model $model) |
||
89 | |||
90 | public function getTemplate() |
||
94 | |||
95 | public function setTemplate($template) |
||
99 | |||
100 | public function toArray() |
||
112 | |||
113 | public function getModelValue() |
||
117 | |||
118 | protected function getValueFromObject($instance, $name) |
||
136 | |||
137 | public function jsonSerialize() |
||
141 | |||
142 | public function toJson($options = 0) |
||
146 | |||
147 | public function __toString() |
||
151 | } |
||
152 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.