| Conditions | 3 |
| Paths | 4 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function crawl(?SchemaCrawlerArguments $arguments = null) : ?string |
||
| 15 | { |
||
| 16 | if ($arguments === null) { |
||
| 17 | $arguments = new SchemaCrawlerArguments(); |
||
| 18 | } |
||
| 19 | |||
| 20 | $crawlerArgumentsArray = $arguments->toArray(); |
||
| 21 | $command = __DIR__.'/../bin/schemacrawler/'.config('laravel-schemacrawler.schemacrawler_executable'); |
||
| 22 | array_unshift($crawlerArgumentsArray, $command); |
||
| 23 | |||
| 24 | $process = new Process($crawlerArgumentsArray); |
||
| 25 | $process->run(); |
||
| 26 | |||
| 27 | if ($process->isSuccessful()) { |
||
| 28 | return $arguments->getOutputFile(); |
||
| 29 | } |
||
| 30 | |||
| 31 | throw new ProcessFailedException($process); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |