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 null|Style |
||
19 | */ |
||
20 | protected $style = null; |
||
21 | |||
22 | /** |
||
23 | * @var StyleMerger |
||
24 | */ |
||
25 | protected $styleMerger; |
||
26 | |||
27 | /** |
||
28 | * Row constructor. |
||
29 | * @param Cell[] $cells |
||
30 | * @param Style|null $style |
||
31 | */ |
||
32 | 88 | public function __construct(array $cells = [], Style $style = null) |
|
40 | |||
41 | /** |
||
42 | * @return Cell[] $cells |
||
43 | */ |
||
44 | 76 | public function getCells() |
|
48 | |||
49 | /** |
||
50 | * @param array $cells |
||
51 | * @return $this |
||
52 | */ |
||
53 | 88 | public function setCells(array $cells) |
|
61 | |||
62 | /** |
||
63 | * @return Style |
||
64 | */ |
||
65 | 64 | public function getStyle() |
|
72 | |||
73 | /** |
||
74 | * @param Style $style |
||
75 | * @return Row |
||
76 | */ |
||
77 | 88 | public function setStyle($style) |
|
82 | |||
83 | /** |
||
84 | * @param Style $style|null |
||
85 | * @return Row |
||
86 | */ |
||
87 | public function applyStyle(Style $style = null) |
||
96 | |||
97 | /** |
||
98 | * @param Cell $cell |
||
99 | * @return Row |
||
100 | */ |
||
101 | 88 | public function addCell(Cell $cell) |
|
106 | |||
107 | /** |
||
108 | * Detect whether this row is considered empty. |
||
109 | * An empty row has either no cells at all - or only empty cells |
||
110 | * |
||
111 | * @return bool |
||
112 | */ |
||
113 | 33 | public function isEmpty() |
|
117 | } |
||
118 |
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):