| Total Complexity | 6 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class MappedClass |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $className; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var MappedClass|null |
||
| 16 | */ |
||
| 17 | private $parent; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var MappedClass[] |
||
| 21 | */ |
||
| 22 | private $children = []; |
||
| 23 | |||
| 24 | public function __construct(string $className) |
||
| 25 | { |
||
| 26 | $this->className = $className; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getClassName(): string |
||
| 33 | { |
||
| 34 | return $this->className; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return MappedClass|null |
||
| 39 | */ |
||
| 40 | public function getParent(): ?MappedClass |
||
| 41 | { |
||
| 42 | return $this->parent; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param MappedClass|null $parent |
||
| 47 | */ |
||
| 48 | public function setParent(?MappedClass $parent): void |
||
| 49 | { |
||
| 50 | $this->parent = $parent; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return MappedClass[] |
||
| 55 | */ |
||
| 56 | public function getChildren(): array |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @param MappedClass $child |
||
| 63 | */ |
||
| 64 | public function addChild(MappedClass $child): void |
||
| 67 | } |
||
| 68 | } |
||
| 69 |