Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class SharedEnvVariable extends EnvVariable |
||
6 | { |
||
7 | /** |
||
8 | * @var null|string |
||
9 | */ |
||
10 | private $containerId; |
||
11 | |||
12 | public function __construct(string $value, string $type, ?string $comment, ?string $containerId) |
||
13 | { |
||
14 | parent::__construct($value, $type, $comment); |
||
15 | $this->containerId = $containerId; |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * @return null|string |
||
20 | */ |
||
21 | public function getContainerId(): ?string |
||
22 | { |
||
23 | return $this->containerId; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Specify data which should be serialized to JSON |
||
28 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
29 | * @return array data which can be serialized by <b>json_encode</b>, |
||
30 | * which is a value of any type other than a resource. |
||
31 | * @since 5.4.0 |
||
32 | */ |
||
33 | public function jsonSerialize(): array |
||
40 | ]); |
||
41 | } |
||
42 | } |
||
43 |