| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | class Data |
||
| 22 | { |
||
| 23 | /** @var ClassData[] classes with class' data */ |
||
| 24 | private static $classes = []; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Adds a class to the global data. |
||
| 28 | * |
||
| 29 | * @param ClassData $class class to add |
||
| 30 | */ |
||
| 31 | 2 | public static function addClass(ClassData $class): void |
|
| 34 | 2 | } |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Returns class' data by the name given. |
||
| 38 | * |
||
| 39 | * @param string $name class' name |
||
| 40 | * @return ClassData class' data |
||
| 41 | * @throws InternalError if the class not found |
||
| 42 | */ |
||
| 43 | 104 | public static function getClass(string $name): ClassData |
|
| 52 |