Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function viewModel(string $viewModel) |
||
43 | { |
||
44 | if (! class_exists($viewModel)) { |
||
45 | throw CouldNotRegisterComponent::viewModelNotFound($this->tag, $viewModel); |
||
46 | } |
||
47 | |||
48 | if (! is_a($viewModel, Arrayable::class, true)) { |
||
49 | throw CouldNotRegisterComponent::viewModelNotArrayable($this->tag, $viewModel); |
||
50 | } |
||
51 | |||
52 | $this->viewModel = $viewModel; |
||
53 | |||
54 | return $this; |
||
55 | } |
||
56 | |||
66 |