| Total Complexity | 8 | 
| Total Lines | 48 | 
| Duplicated Lines | 0 % | 
| Coverage | 94.74% | 
| Changes | 0 | ||
| 1 | <?php | ||
| 7 | class GraphCollection | ||
| 8 | { | ||
| 9 | /** | ||
| 10 | * @var array<int, Graph> | ||
| 11 | */ | ||
| 12 | private array $graphs = []; | ||
| 13 | |||
| 14 | /** | ||
| 15 | * @var array<string, array<string, Graph>> | ||
| 16 | */ | ||
| 17 | private array $graphsByName = []; | ||
| 18 | |||
| 19 | 21 | public function __construct(Graph ...$graphs) | |
| 20 |     { | ||
| 21 | 21 |         foreach ($graphs as $graph) { | |
| 22 | $this->add($graph); | ||
| 23 | } | ||
| 24 | 21 | } | |
| 25 | |||
| 26 | 21 | public function add(Graph $graph): void | |
| 35 | 21 | } | |
| 36 | |||
| 37 | 21 | public function for(object $object, string $graph = 'default'): Graph | |
| 58 |