@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Cart\Commands; |
| 5 | 5 | |
@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | protected function execute(InputInterface $input, OutputInterface $output) : void |
| 26 | 26 | { |
| 27 | 27 | foreach (Finder::create()->files()->name('*.php')-> |
| 28 | - in(__DIR__. '/../../migrations') as $file) { |
|
| 28 | + in(__DIR__ . '/../../migrations') as $file) { |
|
| 29 | 29 | $classes = get_declared_classes(); |
| 30 | 30 | include $file->getRealPath(); |
| 31 | 31 | $diff = array_diff(get_declared_classes(), $classes); |
| 32 | 32 | $class = reset($diff); |
| 33 | 33 | |
| 34 | 34 | (new $class())->up(); |
| 35 | - $output->writeln('<fg=green>Success added migration: ' . basename($file->getFilename(), '.php') .'</>'); |
|
| 35 | + $output->writeln('<fg=green>Success added migration: ' . basename($file->getFilename(), '.php') . '</>'); |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | \ No newline at end of file |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | protected function execute(InputInterface $input, OutputInterface $output) |
| 21 | 21 | { |
| 22 | 22 | foreach (Finder::create()->files()->name('*.php') |
| 23 | - ->in(__DIR__. '/../../migrations') as $file) { |
|
| 23 | + ->in(__DIR__. '/../../migrations') as $file) { |
|
| 24 | 24 | $classes = get_declared_classes(); |
| 25 | 25 | include $file->getRealPath(); |
| 26 | 26 | $diff = array_diff(get_declared_classes(), $classes); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Cart\Commands; |
| 4 | 4 | |
| 5 | 5 | use Symfony\Component\Console\Command\Command; |
@@ -20,13 +20,13 @@ discard block |
||
| 20 | 20 | protected function execute(InputInterface $input, OutputInterface $output) |
| 21 | 21 | { |
| 22 | 22 | foreach (Finder::create()->files()->name('*.php') |
| 23 | - ->in(__DIR__. '/../../migrations') as $file) { |
|
| 23 | + ->in(__DIR__ . '/../../migrations') as $file) { |
|
| 24 | 24 | $classes = get_declared_classes(); |
| 25 | 25 | include $file->getRealPath(); |
| 26 | 26 | $diff = array_diff(get_declared_classes(), $classes); |
| 27 | 27 | $class = reset($diff); |
| 28 | 28 | (new $class())->down(); |
| 29 | - $output->writeln('<fg=green>Success rollback migration: ' . basename($file->getFilename(), '.php') .'</>'); |
|
| 29 | + $output->writeln('<fg=green>Success rollback migration: ' . basename($file->getFilename(), '.php') . '</>'); |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | \ No newline at end of file |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Cart\Contracts; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Cart\Contracts; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Cart\Contracts; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Cart\CountOperation; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Cart\CountOperation; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Cart\Commands; |
| 4 | 4 | |
| 5 | 5 | use Carbon\Carbon; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | protected function moveMigrate(ProgressBar $progress) |
| 52 | 52 | { |
| 53 | - $pathToMigrationsLaravel = $_SERVER["PWD"] . '/database/migrations/'; |
|
| 53 | + $pathToMigrationsLaravel = $_SERVER["PWD"] . '/database/migrations/'; |
|
| 54 | 54 | $pathToStubs = __DIR__ . '/../../migrations/stubs/'; |
| 55 | 55 | |
| 56 | 56 | $this->createDir($pathToMigrationsLaravel); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | protected function moveConfig(ProgressBar $progress) : void |
| 66 | 66 | { |
| 67 | 67 | $pathToConfig = __DIR__ . '/../../config/app.php'; |
| 68 | - $pathToConfigsLaravel = $_SERVER["PWD"] . '/config/'; |
|
| 68 | + $pathToConfigsLaravel = $_SERVER["PWD"] . '/config/'; |
|
| 69 | 69 | $this->createDir($pathToConfigsLaravel); |
| 70 | 70 | |
| 71 | 71 | copy($pathToConfig, $pathToConfigsLaravel . 'cart.php'); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Cart\ServiceProviders; |
| 5 | 5 | |
@@ -12,14 +12,14 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function register(Container $container) : void |
| 14 | 14 | { |
| 15 | - $redis = new Client([ |
|
| 15 | + $redis = new Client([ |
|
| 16 | 16 | 'scheme' => config('cart.drivers.redis.scheme'), |
| 17 | 17 | 'host' => config('cart.drivers.redis.host'), |
| 18 | 18 | 'port' => config('cart.drivers.redis.port') |
| 19 | 19 | ]); |
| 20 | 20 | |
| 21 | 21 | $container->instance(Client::class, $redis); |
| 22 | - $container->bind(RedisDriver::class, function () use ($redis) { |
|
| 22 | + $container->bind(RedisDriver::class, function() use ($redis) { |
|
| 23 | 23 | return new RedisDriver($redis); |
| 24 | 24 | }); |
| 25 | 25 | } |