| 1 | <?php |
||
| 9 | class RowManager |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var StyleMerger |
||
| 13 | */ |
||
| 14 | protected $styleMerger; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * RowManager constructor. |
||
| 18 | * @param StyleMerger $styleMerger |
||
| 19 | */ |
||
| 20 | 2 | public function __construct(StyleMerger $styleMerger) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @param Style $style |
||
| 27 | * @return $this |
||
| 28 | */ |
||
| 29 | public function applyStyle(Row $row, Style $style) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Detect whether a row is considered empty. |
||
| 37 | * An empty row has either no cells at all - or only one empty cell |
||
| 38 | * |
||
| 39 | * @param Row $row |
||
| 40 | * @return bool |
||
| 41 | */ |
||
| 42 | 2 | public function isEmpty(Row $row) |
|
| 47 | } |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: