Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
26 | 21 | public function add(Graph $graph): void |
|
27 | { |
||
28 | 21 | $this->graphs[] = $graph; |
|
29 | |||
30 | 21 | if (!array_key_exists($graph->className(), $this->graphsByName)) { |
|
31 | 21 | $this->graphsByName[$graph->className()] = []; |
|
32 | } |
||
33 | |||
34 | 21 | $this->graphsByName[$graph->className()][$graph->graph()] = $graph; |
|
35 | 21 | } |
|
58 |