1 | <?php |
||
8 | class Row |
||
9 | { |
||
10 | /** |
||
11 | * The cells in this row |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $cells = []; |
||
15 | |||
16 | /** |
||
17 | * The row style |
||
18 | * @var Style|null |
||
19 | */ |
||
20 | protected $style; |
||
21 | |||
22 | /** |
||
23 | * Thw row manager |
||
24 | * @var RowManager |
||
25 | */ |
||
26 | protected $rowManager; |
||
27 | |||
28 | /** |
||
29 | * Row constructor. |
||
30 | * @param Cell[] $cells |
||
31 | * @param Style|null $style |
||
32 | * @param RowManager $rowManager |
||
33 | */ |
||
34 | 87 | public function __construct(array $cells = [], Style $style = null, RowManager $rowManager) |
|
42 | |||
43 | /** |
||
44 | * @return Cell[] $cells |
||
45 | */ |
||
46 | 75 | public function getCells() |
|
50 | |||
51 | /** |
||
52 | * @param array $cells |
||
53 | * @return $this |
||
54 | */ |
||
55 | 87 | public function setCells(array $cells) |
|
64 | |||
65 | /** |
||
66 | * @return Style |
||
67 | */ |
||
68 | 61 | public function getStyle() |
|
76 | |||
77 | /** |
||
78 | * @param Style $style |
||
79 | * @return Row |
||
80 | */ |
||
81 | 87 | public function setStyle($style) |
|
87 | |||
88 | /** |
||
89 | * @param Style $style|null |
||
90 | * @return Row |
||
91 | */ |
||
92 | public function applyStyle(Style $style = null) |
||
98 | |||
99 | /** |
||
100 | * @param Cell $cell |
||
101 | * @return Row |
||
102 | */ |
||
103 | 85 | public function addCell(Cell $cell) |
|
109 | |||
110 | /** |
||
111 | * Detect whether this row is considered empty. |
||
112 | * An empty row has either no cells at all - or only empty cells |
||
113 | * |
||
114 | * @return bool |
||
115 | */ |
||
116 | 70 | public function isEmpty() |
|
120 | } |
||
121 |
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):