| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | abstract class HierarchyBase extends Base |
||
| 20 | { |
||
| 21 | |||
| 22 | protected HierarchyContainer $container; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Get the hierarchy container |
||
| 26 | * |
||
| 27 | * @return HierarchyContainer |
||
| 28 | */ |
||
| 29 | 76 | public function getContainer() : HierarchyContainer { |
|
| 30 | 76 | return $this->container; |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Insert into hierarchical container |
||
| 35 | * |
||
| 36 | * @param Base $object |
||
| 37 | * |
||
| 38 | * @post Object is added to hierarchy |
||
| 39 | * @post If the object has teams -> add other team container to hierarchy |
||
| 40 | * @post If the object has games -> add other game container to hierarchy |
||
| 41 | * |
||
| 42 | * @return $this |
||
| 43 | */ |
||
| 44 | 64 | public function insertIntoContainer(Base $object) : Base { |
|
| 53 | } |
||
| 54 | |||
| 55 | } |