@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * Handle info types |
55 | 55 | * |
56 | 56 | * @param $level |
57 | - * @param $message |
|
57 | + * @param string $message |
|
58 | 58 | * @param array $context |
59 | 59 | */ |
60 | 60 | private function handleInfo($level, $message, array $context) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * Handle debub types |
67 | 67 | * |
68 | 68 | * @param $level |
69 | - * @param $message |
|
69 | + * @param string $message |
|
70 | 70 | * @param array $context |
71 | 71 | */ |
72 | 72 | private function handleDebug($level, $message, array $context) |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * Handle Errors |
81 | 81 | * |
82 | 82 | * @param $level |
83 | - * @param $message |
|
83 | + * @param string $message |
|
84 | 84 | * @param array $context |
85 | 85 | */ |
86 | 86 | private function handleError($level, $message, array $context) |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * Interpolate context into a message. |
93 | 93 | * This is copied directly from PSR-3 documentation |
94 | 94 | * |
95 | - * @param $message |
|
95 | + * @param string $message |
|
96 | 96 | * @param array $context |
97 | 97 | * @return string |
98 | 98 | */ |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Buttress\Concrete\Log; |
4 | 4 | |
5 | 5 | use League\CLImate\CLImate; |
6 | +use Psr\Log\LogLevel; |
|
6 | 7 | use Psr\Log\LoggerInterface; |
7 | 8 | use Psr\Log\LoggerTrait; |
8 | -use Psr\Log\LogLevel; |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * A PSR3 logger that pushes entries out to CLImate |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function addGroup($prefix, callable $callback) |
43 | 43 | { |
44 | - $this->collector->addGroup($prefix . ':', function (Collector $collector) use ($callback) { |
|
44 | + $this->collector->addGroup($prefix . ':', function(Collector $collector) use ($callback) { |
|
45 | 45 | return $callback(new RouteCollector($collector)); |
46 | 46 | }); |
47 | 47 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | $site = $this->site; |
74 | 74 | $cli = $this->container->get(CLImate::class); |
75 | 75 | |
76 | - $dispatcher = Dispatcher::simpleDispatcher(function (RouteCollector $routes) use ($site) { |
|
76 | + $dispatcher = Dispatcher::simpleDispatcher(function(RouteCollector $routes) use ($site) { |
|
77 | 77 | foreach ($this->collection->all() as $command) { |
78 | 78 | $command->registerRoutes($routes, $site); |
79 | 79 | } |
@@ -2,10 +2,10 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace Buttress\Concrete\Console; |
4 | 4 | |
5 | -use Buttress\Concrete\Console\Command\CacheCommand; |
|
6 | 5 | use Buttress\Concrete\CommandBus\Command\HandlerLocator; |
7 | 6 | use Buttress\Concrete\CommandBus\Provider\LegacyProvider; |
8 | 7 | use Buttress\Concrete\CommandBus\Provider\ModernProvider; |
8 | +use Buttress\Concrete\Console\Command\CacheCommand; |
|
9 | 9 | use Buttress\Concrete\Console\Command\Collection\Collection; |
10 | 10 | use Buttress\Concrete\Console\Command\HelpCommand; |
11 | 11 | use Buttress\Concrete\Console\Command\PackageCommand; |
@@ -16,7 +16,6 @@ discard block |
||
16 | 16 | use Buttress\Concrete\Route\Dispatcher; |
17 | 17 | use Buttress\Concrete\Route\RouteCollector; |
18 | 18 | use League\CLImate\CLImate; |
19 | -use League\Tactician\Exception\MissingHandlerException; |
|
20 | 19 | use Psr\Container\ContainerInterface; |
21 | 20 | |
22 | 21 | /** |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public static function simpleDispatcher(callable $routeDefinitionCallback, array $options = []) |
44 | 44 | { |
45 | - return new static(simpleDispatcher(function (Collector $collector) use ($routeDefinitionCallback) { |
|
45 | + return new static(simpleDispatcher(function(Collector $collector) use ($routeDefinitionCallback) { |
|
46 | 46 | return $routeDefinitionCallback(new RouteCollector($collector)); |
47 | 47 | }, $options)); |
48 | 48 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $container = $this->getContainer(); |
40 | 40 | |
41 | 41 | // Share the CLImate object |
42 | - $container->share(CLImate::class, function () use ($container) { |
|
42 | + $container->share(CLImate::class, function() use ($container) { |
|
43 | 43 | return new CLImate(); |
44 | 44 | }); |
45 | 45 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | // Add the command bus |
50 | 50 | $container->add( |
51 | 51 | CommandBus::class, |
52 | - function (ClassNameExtractor $extractor, HandlerLocator $locator, HandleClassNameInflector $inflector) { |
|
52 | + function(ClassNameExtractor $extractor, HandlerLocator $locator, HandleClassNameInflector $inflector) { |
|
53 | 53 | $handlerMiddleware = new CommandHandlerMiddleware($extractor, $locator, $inflector); |
54 | 54 | |
55 | 55 | return new CommandBus([$handlerMiddleware]); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ->withArgument(Collection::class) |
64 | 64 | ->withArgument(Site::class); |
65 | 65 | |
66 | - $container->share(Site::class, function () use ($container) { |
|
66 | + $container->share(Site::class, function() use ($container) { |
|
67 | 67 | $site = $container->get(Locator::class)->getLocation(); |
68 | 68 | if (!$site) { |
69 | 69 | $site = new Site(); |
@@ -90,6 +90,9 @@ |
||
90 | 90 | $this->cli->green('Uninstalled Successfully!'); |
91 | 91 | } |
92 | 92 | |
93 | + /** |
|
94 | + * @param string $command |
|
95 | + */ |
|
93 | 96 | private function getDefinition(Site $site, $command) |
94 | 97 | { |
95 | 98 | /** @var \Buttress\Concrete\Console\Command\Manager\CommandManager[] $definitions */ |