@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Http; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Application; |
6 | 6 | |
@@ -38,13 +38,13 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function register(): void |
40 | 40 | { |
41 | - $this->container->share('request', function () { |
|
41 | + $this->container->share('request', function() { |
|
42 | 42 | return ServerRequestFactory::fromGlobals($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES); |
43 | 43 | }); |
44 | 44 | $this->container->share('response', Response::class); |
45 | 45 | $this->container->share('emitter', SapiEmitter::class); |
46 | 46 | |
47 | - $this->container->share('router', function () { |
|
47 | + $this->container->share('router', function() { |
|
48 | 48 | $router = new RouteCollection($this->container); |
49 | 49 | |
50 | 50 | $controller = new Controller($this->container->get(Kernel::class)); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Toolbelt\Commands; |
6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $name = $this->getArgument('name'); |
31 | 31 | $drivers = collect($items); |
32 | 32 | |
33 | - $driver = $drivers->first(function ($item) use ($name) { |
|
33 | + $driver = $drivers->first(function($item) use ($name) { |
|
34 | 34 | return $item['name'] === $name; |
35 | 35 | }); |
36 | 36 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $composer = json_decode($this->filesystem()->read('composer.json'), true); |
53 | 53 | $installed = collect($composer['require']) |
54 | 54 | ->merge($composer['require-dev']) |
55 | - ->search(function ($_, $item) use ($package) { |
|
55 | + ->search(function($_, $item) use ($package) { |
|
56 | 56 | return hash_equals($item, $package); |
57 | 57 | }); |
58 | 58 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | $process = new Process('composer require '.$package, path()); |
69 | 69 | $output = ''; |
70 | - $result = $process->run(function ($_, $line) use (&$output) { |
|
70 | + $result = $process->run(function($_, $line) use (&$output) { |
|
71 | 71 | $output .= $line; |
72 | 72 | }); |
73 | 73 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Application; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Filesystem; |
6 | 6 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function register(): void |
39 | 39 | { |
40 | - $this->container->share(MountManager::class, function () { |
|
40 | + $this->container->share(MountManager::class, function() { |
|
41 | 41 | $filesystems = [ |
42 | 42 | 'local' => new Filesystem(new Local($this->container->get('base_path'))), |
43 | 43 | ]; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Toolbelt; |
6 | 6 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function register(): void |
35 | 35 | { |
36 | - $this->container->share('toolbelt', function () { |
|
36 | + $this->container->share('toolbelt', function() { |
|
37 | 37 | $application = new Application('FondBot', Kernel::VERSION); |
38 | 38 | $application->addCommands([ |
39 | 39 | new Commands\MakeIntent, |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Toolbelt\Commands; |
6 | 6 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $logger = resolve(Logger::class); |
34 | 34 | |
35 | 35 | /** @var StreamHandler|null $handler */ |
36 | - $handler = collect($logger->getHandlers())->first(function (HandlerInterface $item) { |
|
36 | + $handler = collect($logger->getHandlers())->first(function(HandlerInterface $item) { |
|
37 | 37 | return $item instanceof StreamHandler; |
38 | 38 | }); |
39 | 39 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | $command = 'tail -f -n 1000 '.escapeshellarg($handler->getUrl()); |
47 | 47 | |
48 | - (new Process($command))->setTimeout(null)->run(function ($_, $line) { |
|
48 | + (new Process($command))->setTimeout(null)->run(function($_, $line) { |
|
49 | 49 | $this->line($line); |
50 | 50 | }); |
51 | 51 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Toolbelt\Commands; |
6 | 6 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $manager = resolve(ChannelManager::class); |
29 | 29 | |
30 | 30 | $channels = collect($manager->all()) |
31 | - ->map(function ($item, $name) { |
|
31 | + ->map(function($item, $name) { |
|
32 | 32 | return [$name, $item['driver'], '/channels/'.$name]; |
33 | 33 | }) |
34 | 34 | ->toArray(); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace FondBot\Toolbelt\Commands; |
6 | 6 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $items = json_decode((string) $response, true); |
26 | 26 | |
27 | 27 | $drivers = collect($items) |
28 | - ->map(function ($item) { |
|
28 | + ->map(function($item) { |
|
29 | 29 | return [$item['name'], $item['package'], $item['official'] ? '✅' : '❌']; |
30 | 30 | }) |
31 | 31 | ->toArray(); |