1 | <?php |
||
9 | class Row |
||
10 | { |
||
11 | /** |
||
12 | * The cells in this row |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $cells = []; |
||
16 | |||
17 | /** |
||
18 | * The row style |
||
19 | * @var null|Style |
||
20 | */ |
||
21 | protected $style = null; |
||
22 | |||
23 | /** |
||
24 | * Thw row manager |
||
25 | * @var RowManager |
||
26 | */ |
||
27 | protected $rowManager; |
||
28 | |||
29 | /** |
||
30 | * Row constructor. |
||
31 | * @param Cell[] $cells |
||
32 | * @param Style|null $style |
||
33 | * @param RowManager $rowManager |
||
34 | */ |
||
35 | 87 | public function __construct(array $cells = [], Style $style = null, RowManager $rowManager) |
|
43 | |||
44 | /** |
||
45 | * @return Cell[] $cells |
||
46 | */ |
||
47 | 75 | public function getCells() |
|
51 | |||
52 | /** |
||
53 | * @param array $cells |
||
54 | * @return $this |
||
55 | */ |
||
56 | 87 | public function setCells(array $cells) |
|
64 | |||
65 | /** |
||
66 | * @return Style |
||
67 | */ |
||
68 | 61 | public function getStyle() |
|
75 | |||
76 | /** |
||
77 | * @param Style $style |
||
78 | * @return Row |
||
79 | */ |
||
80 | 87 | public function setStyle($style) |
|
85 | |||
86 | /** |
||
87 | * @param Style $style|null |
||
88 | * @return Row |
||
89 | */ |
||
90 | public function applyStyle(Style $style = null) |
||
95 | |||
96 | /** |
||
97 | * @param Cell $cell |
||
98 | * @return Row |
||
99 | */ |
||
100 | 85 | public function addCell(Cell $cell) |
|
105 | |||
106 | /** |
||
107 | * Detect whether this row is considered empty. |
||
108 | * An empty row has either no cells at all - or only empty cells |
||
109 | * |
||
110 | * @return bool |
||
111 | */ |
||
112 | 70 | public function isEmpty() |
|
116 | } |
||
117 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):