| @@ -28,7 +28,7 @@ discard block | ||
| 28 | 28 | /** | 
| 29 | 29 | * Get the command definitions this command provides | 
| 30 | 30 | * | 
| 31 | - * @param \Buttress\Concrete\Locator\Site|null $site | |
| 31 | + * @param Site $site | |
| 32 | 32 | * @return \Buttress\Concrete\Console\Command\Manager\CommandManager[] | 
| 33 | 33 | * @throws \Exception | 
| 34 | 34 | */ | 
| @@ -68,6 +68,9 @@ discard block | ||
| 68 | 68 | }); | 
| 69 | 69 | } | 
| 70 | 70 | |
| 71 | + /** | |
| 72 | + * @param string $path | |
| 73 | + */ | |
| 71 | 74 | private function locateWebroots($path) | 
| 72 | 75 |      { | 
| 73 | 76 | $flags = FS::CURRENT_AS_PATHNAME | FS::SKIP_DOTS; | 
| @@ -82,7 +85,7 @@ discard block | ||
| 82 | 85 | |
| 83 | 86 | /** | 
| 84 | 87 | * @param \RecursiveDirectoryIterator $iterator | 
| 85 | - * @return \RecursiveDirectoryIterator[] | |
| 88 | + * @return \Generator | |
| 86 | 89 | */ | 
| 87 | 90 | private function directoryGenerator(\RecursiveDirectoryIterator $iterator) | 
| 88 | 91 |      { | 
| @@ -102,7 +105,7 @@ discard block | ||
| 102 | 105 | } | 
| 103 | 106 | /** | 
| 104 | 107 | * @param \RecursiveDirectoryIterator $iterator | 
| 105 | - * @return \RecursiveDirectoryIterator[] | |
| 108 | + * @return \Generator | |
| 106 | 109 | */ | 
| 107 | 110 | private function visibleChildren(\RecursiveDirectoryIterator $iterator) | 
| 108 | 111 |      { | 
| @@ -56,8 +56,8 @@ | ||
| 56 | 56 | */ | 
| 57 | 57 | public function registerRoutes(RouteCollector $collector, Site $site = null) | 
| 58 | 58 |      { | 
| 59 | -        $collector->addGroup(['site', 'sites'], function (RouteCollector $collector) use ($site) { | |
| 60 | -            $collector->addRoute(['locate', 'find'], function () use ($site) { | |
| 59 | +        $collector->addGroup(['site', 'sites'], function(RouteCollector $collector) use ($site) { | |
| 60 | +            $collector->addRoute(['locate', 'find'], function() use ($site) { | |
| 61 | 61 | $command = array_get($this->getCommands($site), 'site:locate'); | 
| 62 | 62 | $command->parse(); | 
| 63 | 63 |                  $path = realpath($command->get('path')); | 
| @@ -52,7 +52,7 @@ discard block | ||
| 52 | 52 | $container = $this->getContainer(); | 
| 53 | 53 | |
| 54 | 54 | // Share the CLImate object | 
| 55 | -        $container->share(CLImate::class, function () use ($container) { | |
| 55 | +        $container->share(CLImate::class, function() use ($container) { | |
| 56 | 56 | return new CLImate(); | 
| 57 | 57 | }); | 
| 58 | 58 | |
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | // Add the command bus | 
| 63 | 63 | $container->add( | 
| 64 | 64 | CommandBus::class, | 
| 65 | -            function (ClassNameExtractor $extractor, HandlerLocator $locator, HandleClassNameInflector $inflector) { | |
| 65 | +            function(ClassNameExtractor $extractor, HandlerLocator $locator, HandleClassNameInflector $inflector) { | |
| 66 | 66 | $handlerMiddleware = new CommandHandlerMiddleware($extractor, $locator, $inflector); | 
| 67 | 67 | |
| 68 | 68 | return new CommandBus([$handlerMiddleware]); | 
| @@ -78,7 +78,7 @@ discard block | ||
| 78 | 78 | ErrorHandler::class | 
| 79 | 79 | ]); | 
| 80 | 80 | |
| 81 | -        $container->share(Site::class, function () use ($container) { | |
| 81 | +        $container->share(Site::class, function() use ($container) { | |
| 82 | 82 | $site = $container->get(Locator::class)->getLocation(); | 
| 83 | 83 |              if (!$site) { | 
| 84 | 84 | $site = Site::create(); | 
| @@ -54,7 +54,7 @@ | ||
| 54 | 54 | } | 
| 55 | 55 | |
| 56 | 56 |          foreach ($prefixes as $string) { | 
| 57 | -            $this->collector->addGroup($string . ':', function (Collector $collector) use ($callback) { | |
| 57 | +            $this->collector->addGroup($string . ':', function(Collector $collector) use ($callback) { | |
| 58 | 58 | return $callback(new RouteCollector($collector)); | 
| 59 | 59 | }); | 
| 60 | 60 | } |