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