Total Complexity | 4 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
6 | class Block implements BlockInterface, \JsonSerializable |
||
7 | { |
||
8 | /** |
||
9 | * @var ThemeDescriptorInterface |
||
10 | */ |
||
11 | private $themeDescriptor; |
||
12 | /** |
||
13 | * @var mixed[] |
||
14 | */ |
||
15 | private $context; |
||
16 | |||
17 | /** |
||
18 | * @param ThemeDescriptorInterface $themeDescriptor |
||
19 | * @param mixed[] $context |
||
20 | */ |
||
21 | public function __construct(ThemeDescriptorInterface $themeDescriptor, array $context) |
||
22 | { |
||
23 | $this->themeDescriptor = $themeDescriptor; |
||
24 | $this->context = $context; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return ThemeDescriptorInterface |
||
29 | */ |
||
30 | public function getThemeDescriptor(): ThemeDescriptorInterface |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @return mixed[] |
||
37 | */ |
||
38 | public function getContext(): array |
||
41 | } |
||
42 | |||
43 | public function jsonSerialize() |
||
51 |