Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class FileContents implements Serializable |
||
9 | { |
||
10 | use SerializableTrait; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $data; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $contentType; |
||
21 | |||
22 | public function __construct(string $data, string $contentType) |
||
23 | { |
||
24 | $this->data = $data; |
||
25 | $this->contentType = $contentType; |
||
26 | } |
||
27 | |||
28 | public function getData(): string |
||
29 | { |
||
30 | return $this->data; |
||
31 | } |
||
32 | |||
33 | public function getContentType(): string |
||
34 | { |
||
35 | return $this->contentType; |
||
36 | } |
||
37 | |||
38 | public function __serialize(): array |
||
43 | ]; |
||
44 | } |
||
45 | |||
46 | public function __unserialize(array $serialized): void |
||
50 | } |
||
51 | } |
||
52 |