@@ -25,11 +25,11 @@ |
||
| 25 | 25 | public function boot() |
| 26 | 26 | { |
| 27 | 27 | // todo: refactor along with console package. |
| 28 | - $this->container->bindFactory(InputInterface::class, function () { |
|
| 28 | + $this->container->bindFactory(InputInterface::class, function() { |
|
| 29 | 29 | return new ArgvInput; |
| 30 | 30 | }, true); |
| 31 | 31 | |
| 32 | - $this->container->bindFactory(OutputInterface::class, function () { |
|
| 32 | + $this->container->bindFactory(OutputInterface::class, function() { |
|
| 33 | 33 | return new ConsoleOutput; |
| 34 | 34 | }, true); |
| 35 | 35 | |
@@ -82,8 +82,7 @@ discard block |
||
| 82 | 82 | // Push pretty page handler only for local environment |
| 83 | 83 | $whoops->pushHandler( |
| 84 | 84 | $kernel->getEnvironment() === 'local' ? |
| 85 | - new PrettyPageHandler() : |
|
| 86 | - new PlainTextHandler() |
|
| 85 | + new PrettyPageHandler() : new PlainTextHandler() |
|
| 87 | 86 | ); |
| 88 | 87 | } |
| 89 | 88 | /** |
@@ -94,10 +93,10 @@ discard block |
||
| 94 | 93 | /* |
| 95 | 94 | * Bind PSR-3 logger |
| 96 | 95 | */ |
| 97 | - $container->share(\Monolog\Logger::class, function (Container $c) { |
|
| 96 | + $container->share(\Monolog\Logger::class, function(Container $c) { |
|
| 98 | 97 | $logger = new \Monolog\Logger('venta'); |
| 99 | 98 | $handler = new \Monolog\Handler\StreamHandler(__DIR__ . '/../storage/logs/app.log'); |
| 100 | - $handler->pushProcessor(function ($record) use ($c) { |
|
| 99 | + $handler->pushProcessor(function($record) use ($c) { |
|
| 101 | 100 | /** @var \Venta\Contracts\Kernel\Kernel $kernel */ |
| 102 | 101 | $kernel = $c->get(Kernel::class); |
| 103 | 102 | if ($kernel->isCli()) { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function boot() |
| 24 | 24 | { |
| 25 | 25 | // todo: implement multi-channel configuration. |
| 26 | - $this->container->bindFactory(LoggerInterface::class, function (Config $config) { |
|
| 26 | + $this->container->bindFactory(LoggerInterface::class, function(Config $config) { |
|
| 27 | 27 | |
| 28 | 28 | $handler = new StreamHandler( |
| 29 | 29 | $this->kernel->getRootPath() . '/storage/logs/venta.log', |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $handler->pushProcessor(new PsrLogMessageProcessor); |
| 34 | 34 | |
| 35 | 35 | if (!$this->kernel->isCli()) { |
| 36 | - $handler->pushProcessor(new WebProcessor(null, [ // todo: make list configurable? |
|
| 36 | + $handler->pushProcessor(new WebProcessor(null, [// todo: make list configurable? |
|
| 37 | 37 | 'url' => 'REQUEST_URI', |
| 38 | 38 | 'ip' => 'REMOTE_ADDR', |
| 39 | 39 | 'http_method' => 'REQUEST_METHOD', |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Venta\Container\ArgumentResolver; |
| 6 | 6 | use PhpSpec\ObjectBehavior; |
| 7 | -use Prophecy\Argument; |
|
| 8 | 7 | use Venta\Contracts\Container\ArgumentResolver as ArgumentResolverContract; |
| 9 | 8 | use Venta\Contracts\Container\Container; |
| 10 | 9 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * Helper method to get input argument |
| 37 | 37 | * |
| 38 | 38 | * @param string $name |
| 39 | - * @return mixed |
|
| 39 | + * @return string |
|
| 40 | 40 | */ |
| 41 | 41 | public function arg(string $name) |
| 42 | 42 | { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * Returns command arguments array |
| 95 | 95 | * Values must be instances of InputArgument |
| 96 | 96 | * |
| 97 | - * @return array|InputArgument[] |
|
| 97 | + * @return \Symfony\Component\Console\Input\InputArgument[] |
|
| 98 | 98 | */ |
| 99 | 99 | public function returnArguments(): array |
| 100 | 100 | { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | * Returns command options array |
| 106 | 106 | * Values must be instances of InputOption |
| 107 | 107 | * |
| 108 | - * @return array|InputOption[] |
|
| 108 | + * @return \Symfony\Component\Console\Input\InputOption[] |
|
| 109 | 109 | */ |
| 110 | 110 | public function returnOptions(): array |
| 111 | 111 | { |