| 1 | <?php |
||
| 7 | class BlocksByDayControl extends BaseControl |
||
| 8 | { |
||
| 9 | |||
| 10 | const TEMPLATE_NAME = 'BlocksByDay'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var ProgramsControl |
||
| 14 | */ |
||
| 15 | private $programs; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var BlockModel |
||
| 19 | */ |
||
| 20 | private $blockModel; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param BlockModel $model |
||
| 24 | */ |
||
| 25 | public function __construct(BlockModel $model, ProgramsControl $control) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $day |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function render($day) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return ProgramsControl |
||
| 48 | */ |
||
| 49 | protected function createComponentPrograms() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param ProgramsControl $control |
||
| 56 | * @return $this |
||
| 57 | */ |
||
| 58 | protected function setProgramsControl(ProgramsControl $control) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return BlockModel |
||
| 67 | */ |
||
| 68 | protected function getBlockModel() |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @param BlockModel $model |
||
| 75 | * @return $this |
||
| 76 | */ |
||
| 77 | protected function setBlockModel(BlockModel $model) |
||
| 83 | |||
| 84 | } |
||
| 85 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: