| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | private function write(string $dependencyIndex): void |
||
| 45 | { |
||
| 46 | if ($dependencyIndex === 'Ray\Aop\MethodInvocation-') { |
||
| 47 | return; |
||
| 48 | } |
||
| 49 | |||
| 50 | [$interface, $name] = explode('-', $dependencyIndex); |
||
| 51 | $instance = (new ScriptInjector($this->scriptDir))->getInstance($interface, $name); |
||
| 52 | $graph = (string) (new Printo($instance)) |
||
| 53 | ->setRange(Printo::RANGE_ALL) |
||
| 54 | ->setLinkDistance(130) |
||
| 55 | ->setCharge(-500); |
||
| 56 | $graphDir = $this->scriptDir . '/graph/'; |
||
| 57 | if (! file_exists($graphDir)) { |
||
| 58 | mkdir($graphDir); |
||
| 59 | } |
||
| 60 | |||
| 61 | $file = $graphDir . str_replace('\\', '_', $dependencyIndex) . '.html'; |
||
| 62 | file_put_contents($file, $graph, LOCK_EX); |
||
| 63 | } |
||
| 64 | } |
||
| 65 |