| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public static function installSwaggerUi() |
||
| 27 | { |
||
| 28 | $fs = new Filesystem(); |
||
| 29 | $cwd = getcwd(); |
||
| 30 | |||
| 31 | foreach ((new Finder())->in(implode('/', [$cwd, self::SWAGGER_UI_SOURCE])) as $file) { |
||
| 32 | $destination = implode('/', [$cwd, self::SWAGGER_UI_DESTINATION, $file->getRelativePathname()]); |
||
| 33 | if ($file->isDir()) { |
||
| 34 | $fs->mkdir($destination); |
||
| 35 | continue; |
||
| 36 | } |
||
| 37 | |||
| 38 | $fs->copy($file->getRealPath(), $destination, true); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 |