| 1 | <?php  | 
            ||
| 9 | class CellManager  | 
            ||
| 10 | { | 
            ||
| 11 | /**  | 
            ||
| 12 | * @var StyleMerger  | 
            ||
| 13 | */  | 
            ||
| 14 | protected $styleMerger;  | 
            ||
| 15 | |||
| 16 | /**  | 
            ||
| 17 | * CellManager constructor.  | 
            ||
| 18 | * @param StyleMerger $styleMerger  | 
            ||
| 19 | */  | 
            ||
| 20 | public function __construct(StyleMerger $styleMerger)  | 
            ||
| 24 | |||
| 25 | /**  | 
            ||
| 26 | * Merges a Style into a cells Style.  | 
            ||
| 27 | *  | 
            ||
| 28 | * @param Cell $cell  | 
            ||
| 29 | * @param Style $style  | 
            ||
| 30 | * @return $this  | 
            ||
| 31 | */  | 
            ||
| 32 | public function applyStyle(Cell $cell, Style $style)  | 
            ||
| 37 | }  | 
            
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: