Passed
Pull Request — master (#464)
by Kirill
12:51
created
monorepo-builder.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
  *
18 18
  * @see https://github.com/symplify/symplify/issues/2061
19 19
  */
20
-register_shutdown_function(static function () {
21
-    $dest = json_decode(file_get_contents(__DIR__ . '/composer.json'), true);
20
+register_shutdown_function(static function (){
21
+    $dest = json_decode(file_get_contents(__DIR__.'/composer.json'), true);
22 22
 
23 23
     $result = [
24 24
         'name' => 'spiral/framework',
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     $json = json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
55 55
 
56
-    file_put_contents(__DIR__ . '/composer.json', $json . "\n");
56
+    file_put_contents(__DIR__.'/composer.json', $json."\n");
57 57
 });
58 58
 
59 59
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
  *
18 18
  * @see https://github.com/symplify/symplify/issues/2061
19 19
  */
20
-register_shutdown_function(static function () {
20
+register_shutdown_function(static function ()
21
+{
21 22
     $dest = json_decode(file_get_contents(__DIR__ . '/composer.json'), true);
22 23
 
23 24
     $result = [
Please login to merge, or discard this patch.
src/Bridge/Dotenv/src/Bootloader/DotenvBootloader.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function boot(DirectoriesInterface $dirs, EnvironmentInterface $env)
26 26
     {
27
-        $dotenvPath = $env->get('DOTENV_PATH', $dirs->get('root') . '.env');
27
+        $dotenvPath = $env->get('DOTENV_PATH', $dirs->get('root').'.env');
28 28
 
29
-        if (!file_exists($dotenvPath)) {
29
+        if (!file_exists($dotenvPath)){
30 30
             return;
31 31
         }
32 32
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         )
37 37
             ->load();
38 38
 
39
-        foreach ($dotenv as $key => $value) {
39
+        foreach ($dotenv as $key => $value){
40 40
             $env->set($key, $value);
41 41
         }
42 42
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $dotenvPath = $env->get('DOTENV_PATH', $dirs->get('root') . '.env');
28 28
 
29
-        if (!file_exists($dotenvPath)) {
29
+        if (!file_exists($dotenvPath))
30
+        {
30 31
             return;
31 32
         }
32 33
 
@@ -36,7 +37,8 @@  discard block
 block discarded – undo
36 37
         )
37 38
             ->load();
38 39
 
39
-        foreach ($dotenv as $key => $value) {
40
+        foreach ($dotenv as $key => $value)
41
+        {
40 42
             $env->set($key, $value);
41 43
         }
42 44
     }
Please login to merge, or discard this patch.
src/Framework/Http/RrDispatcher.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         PSR7WorkerInterface $worker,
59 59
         ContainerInterface $container,
60 60
         FinalizerInterface $finalizer
61
-    ) {
61
+    ){
62 62
         $this->env = $env;
63 63
         $this->worker = $worker;
64 64
         $this->container = $container;
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
     {
81 81
         /** @var Http $http */
82 82
         $http = $this->container->get(Http::class);
83
-        while ($request = $this->worker->waitRequest()) {
84
-            try {
83
+        while ($request = $this->worker->waitRequest()){
84
+            try{
85 85
                 $response = $http->handle($request);
86 86
 
87 87
                 $this->worker->respond($response);
88
-            } catch (\Throwable $e) {
88
+            }catch (\Throwable $e){
89 89
                 $this->worker->respond($this->errorToResponse($e));
90
-            } finally {
90
+            }finally{
91 91
                 $this->finalizer->finalize(false);
92 92
             }
93 93
         }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $handler = new HtmlHandler();
103 103
 
104
-        try {
104
+        try{
105 105
             /** @var SnapshotInterface $snapshot */
106 106
             $snapshot = $this->container->get(SnapshotterInterface::class)->register($e);
107 107
             \file_put_contents('php://stderr', $snapshot->getMessage());
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
             // on demand
110 110
             $state = $this->container->get(StateInterface::class);
111 111
 
112
-            if ($state !== null) {
112
+            if ($state !== null){
113 113
                 $handler = $handler->withState($state);
114 114
             }
115
-        } catch (\Throwable | ContainerExceptionInterface $se) {
115
+        }catch (\Throwable | ContainerExceptionInterface $se){
116 116
             \file_put_contents('php://stderr', (string)$e);
117 117
         }
118 118
 
Please login to merge, or discard this patch.
Braces   +17 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,14 +80,20 @@  discard block
 block discarded – undo
80 80
     {
81 81
         /** @var Http $http */
82 82
         $http = $this->container->get(Http::class);
83
-        while ($request = $this->worker->waitRequest()) {
84
-            try {
83
+        while ($request = $this->worker->waitRequest())
84
+        {
85
+            try
86
+            {
85 87
                 $response = $http->handle($request);
86 88
 
87 89
                 $this->worker->respond($response);
88
-            } catch (\Throwable $e) {
90
+            }
91
+            catch (\Throwable $e)
92
+            {
89 93
                 $this->worker->respond($this->errorToResponse($e));
90
-            } finally {
94
+            }
95
+            finally
96
+            {
91 97
                 $this->finalizer->finalize(false);
92 98
             }
93 99
         }
@@ -101,7 +107,8 @@  discard block
 block discarded – undo
101 107
     {
102 108
         $handler = new HtmlHandler();
103 109
 
104
-        try {
110
+        try
111
+        {
105 112
             /** @var SnapshotInterface $snapshot */
106 113
             $snapshot = $this->container->get(SnapshotterInterface::class)->register($e);
107 114
             \file_put_contents('php://stderr', $snapshot->getMessage());
@@ -109,10 +116,13 @@  discard block
 block discarded – undo
109 116
             // on demand
110 117
             $state = $this->container->get(StateInterface::class);
111 118
 
112
-            if ($state !== null) {
119
+            if ($state !== null)
120
+            {
113 121
                 $handler = $handler->withState($state);
114 122
             }
115
-        } catch (\Throwable | ContainerExceptionInterface $se) {
123
+        }
124
+        catch (\Throwable | ContainerExceptionInterface $se)
125
+        {
116 126
             \file_put_contents('php://stderr', (string)$e);
117 127
         }
118 128
 
Please login to merge, or discard this patch.
src/Jobs/tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,4 +13,4 @@
 block discarded – undo
13 13
 ini_set('display_errors', 'stderr');
14 14
 
15 15
 //Composer
16
-require dirname(__DIR__) . '/vendor_php/autoload.php';
16
+require dirname(__DIR__).'/vendor_php/autoload.php';
Please login to merge, or discard this patch.
src/Jobs/tests/Jobs/ShortCircuitTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 {
24 24
     protected function tearDown(): void
25 25
     {
26
-        if (file_exists(Job::JOB_FILE)) {
26
+        if (file_exists(Job::JOB_FILE)){
27 27
             unlink(Job::JOB_FILE);
28 28
         }
29 29
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@
 block discarded – undo
23 23
 {
24 24
     protected function tearDown(): void
25 25
     {
26
-        if (file_exists(Job::JOB_FILE)) {
26
+        if (file_exists(Job::JOB_FILE))
27
+        {
27 28
             unlink(Job::JOB_FILE);
28 29
         }
29 30
     }
Please login to merge, or discard this patch.
src/Jobs/tests/Jobs/Sqs/Job.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 class Job extends JobHandler
17 17
 {
18
-    public const JOB_FILE = __DIR__ . '/../../local.job';
18
+    public const JOB_FILE = __DIR__.'/../../local.job';
19 19
 
20 20
     public function invoke(string $id, array $payload): void
21 21
     {
Please login to merge, or discard this patch.
src/Jobs/tests/Jobs/Local/Job.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 class Job extends JobHandler
17 17
 {
18
-    public const JOB_FILE = __DIR__ . '/../../local.job';
18
+    public const JOB_FILE = __DIR__.'/../../local.job';
19 19
 
20 20
     public function invoke(string $id, array $payload): void
21 21
     {
Please login to merge, or discard this patch.
src/Jobs/tests/Jobs/BaseTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     protected function tearDown(): void
37 37
     {
38
-        if (file_exists((static::JOB)::JOB_FILE)) {
38
+        if (file_exists((static::JOB)::JOB_FILE)){
39 39
             unlink((static::JOB)::JOB_FILE);
40 40
         }
41 41
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         $start = microtime(true);
107 107
         $try = 0;
108
-        while (!file_exists($this->job::JOB_FILE) && $try < 10) {
108
+        while (!file_exists($this->job::JOB_FILE) && $try < 10){
109 109
             usleep(250000);
110 110
             $try++;
111 111
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@  discard block
 block discarded – undo
35 35
 
36 36
     protected function tearDown(): void
37 37
     {
38
-        if (file_exists((static::JOB)::JOB_FILE)) {
38
+        if (file_exists((static::JOB)::JOB_FILE))
39
+        {
39 40
             unlink((static::JOB)::JOB_FILE);
40 41
         }
41 42
     }
@@ -105,7 +106,8 @@  discard block
 block discarded – undo
105 106
     {
106 107
         $start = microtime(true);
107 108
         $try = 0;
108
-        while (!file_exists($this->job::JOB_FILE) && $try < 10) {
109
+        while (!file_exists($this->job::JOB_FILE) && $try < 10)
110
+        {
109 111
             usleep(250000);
110 112
             $try++;
111 113
         }
Please login to merge, or discard this patch.
src/Jobs/tests/Jobs/Amqp/Job.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 class Job extends JobHandler
17 17
 {
18
-    public const JOB_FILE = __DIR__ . '/../../local.job';
18
+    public const JOB_FILE = __DIR__.'/../../local.job';
19 19
 
20 20
     public function invoke(string $id, array $payload): void
21 21
     {
Please login to merge, or discard this patch.