| Conditions | 4 |
| Paths | 8 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public static function start($path, Finder $finder = null, Filesystem $files = null) |
||
| 18 | { |
||
| 19 | $finder = $finder ?: new Finder(); |
||
| 20 | |||
| 21 | // We will use the finder to locate all "autoload.php" files in the workbench |
||
| 22 | // directory, then we will include them each so that they are able to load |
||
| 23 | // the appropriate classes and file used by the given workbench package. |
||
| 24 | $files = $files ?: new Filesystem(); |
||
| 25 | |||
| 26 | $autoloads = $finder->in($path)->files()->name('autoload.php')->depth('<= 3')->followLinks(); |
||
| 27 | |||
| 28 | foreach ($autoloads as $file) { |
||
| 29 | $files->requireOnce($file->getRealPath()); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 |