Total Complexity | 7 |
Total Lines | 71 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | class ContentType |
||
23 | { |
||
24 | use HydratorTrait { |
||
25 | fromArray as private fromArrayTrait; |
||
26 | } |
||
27 | |||
28 | /** @var string */ |
||
29 | private $id = ""; |
||
30 | /** @var string */ |
||
31 | private $name = ""; |
||
32 | /** @var string */ |
||
33 | private $description = ""; |
||
34 | /** @var ContentTypeField[] */ |
||
35 | private $fields = []; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * ContentType constructor. |
||
40 | * |
||
41 | */ |
||
42 | 2 | final protected function __construct() |
|
43 | { |
||
44 | 2 | } |
|
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | 2 | public function getId(): string |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | 2 | public function getName(): string |
|
58 | { |
||
59 | 2 | return $this->name; |
|
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | 2 | public function getDescription(): string |
|
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return ContentTypeField[] |
||
72 | */ |
||
73 | 1 | public function getFields(): array |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param array $data |
||
80 | * @return ContentType |
||
81 | */ |
||
82 | 3 | public static function fromArray(array $data) |
|
95 |