Total Complexity | 8 |
Total Lines | 80 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class SignalProperties implements JsonSerializable |
||
12 | { |
||
13 | /** @var string */ |
||
14 | private $session; |
||
15 | /** @var string */ |
||
16 | private $to; |
||
17 | /** @var string */ |
||
18 | private $type; |
||
19 | /** @var string */ |
||
20 | private $data; |
||
21 | |||
22 | /** |
||
23 | * SignalProperties constructor. |
||
24 | * @param string $session |
||
25 | * @param string|null $data |
||
26 | * @param string|null $type |
||
27 | * @param string|null $to |
||
28 | */ |
||
29 | public function __construct(string $session, ?string $data = null, ?string $type = null, ?string $to = null) |
||
30 | { |
||
31 | $this->session = $session; |
||
32 | $this->data = $data; |
||
33 | $this->type = $type; |
||
34 | $this->to = $to; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Session name of the recording |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | public function session() |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Convert the model instance to JSON. |
||
49 | * |
||
50 | * @param int $options |
||
51 | * @return string |
||
52 | * |
||
53 | */ |
||
54 | public function toJson($options = 0): string |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Specify data which should be serialized to JSON |
||
62 | * @link https://php.net/manual/en/jsonserializable.jsonserialize.php |
||
63 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
64 | * which is a value of any type other than a resource. |
||
65 | * @since 5.4.0 |
||
66 | */ |
||
67 | public function jsonSerialize() |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * Convert the model instance to an array. |
||
74 | * |
||
75 | * @return array |
||
76 | */ |
||
77 | public function toArray(): array |
||
93 |