Passed
Push — master ( bc79a5...b222de )
by Anton
02:01
created
tests/Framework/GRPC/ListTest.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function setUp()
20 20
     {
21 21
         exec('protoc 2>&1', $out);
22
-        if (strpos(join("\n", $out), '--php_out') === false) {
22
+        if (strpos(join("\n", $out), '--php_out') === false){
23 23
             $this->markTestSkipped('Protoc binary is missing');
24 24
             return;
25 25
         }
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         parent::setUp();
28 28
 
29 29
         $fs = new Files();
30
-        $this->proto = $fs->normalizePath($this->app->dir('app') . 'proto/service.proto');
30
+        $this->proto = $fs->normalizePath($this->app->dir('app').'proto/service.proto');
31 31
 
32 32
         // protoc can't figure relative paths
33 33
         $this->proto = str_replace('Framework/../', '', $this->proto);
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
 
40 40
         $fs = new Files();
41 41
 
42
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
43
-            $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
42
+        if ($fs->isDirectory($this->app->dir('app').'src/Service')){
43
+            $fs->deleteDirectory($this->app->dir('app').'src/Service');
44 44
         }
45 45
 
46
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
47
-            $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
46
+        if ($fs->isDirectory($this->app->dir('app').'src/GPBMetadata')){
47
+            $fs->deleteDirectory($this->app->dir('app').'src/GPBMetadata');
48 48
         }
49 49
     }
50 50
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             'proto' => $this->proto
62 62
         ]);
63 63
 
64
-        file_put_contents($this->app->dir('app') . 'src/Service/EchoService.php', GenerateTest::SERVICE);
64
+        file_put_contents($this->app->dir('app').'src/Service/EchoService.php', GenerateTest::SERVICE);
65 65
 
66 66
         $out = $this->runCommandDebug('grpc:services');
67 67
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@  discard block
 block discarded – undo
19 19
     public function setUp()
20 20
     {
21 21
         exec('protoc 2>&1', $out);
22
-        if (strpos(join("\n", $out), '--php_out') === false) {
22
+        if (strpos(join("\n", $out), '--php_out') === false)
23
+        {
23 24
             $this->markTestSkipped('Protoc binary is missing');
24 25
             return;
25 26
         }
@@ -39,11 +40,13 @@  discard block
 block discarded – undo
39 40
 
40 41
         $fs = new Files();
41 42
 
42
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
43
+        if ($fs->isDirectory($this->app->dir('app') . 'src/Service'))
44
+        {
43 45
             $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
44 46
         }
45 47
 
46
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
48
+        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata'))
49
+        {
47 50
             $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
48 51
         }
49 52
     }
Please login to merge, or discard this patch.
tests/Framework/GRPC/DispatcherTest.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
     public function setUp()
22 22
     {
23 23
         exec('protoc 2>&1', $out);
24
-        if (strpos(join("\n", $out), '--php_out') === false) {
24
+        if (strpos(join("\n", $out), '--php_out') === false){
25 25
             $this->markTestSkipped('Protoc binary is missing');
26 26
         }
27 27
 
28 28
         parent::setUp();
29 29
 
30 30
         $fs = new Files();
31
-        $proto = $fs->normalizePath($this->app->dir('app') . 'proto/service.proto');
31
+        $proto = $fs->normalizePath($this->app->dir('app').'proto/service.proto');
32 32
 
33 33
         // protoc can't figure relative paths
34 34
         $proto = str_replace('Framework/../', '', $proto);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             'proto' => $proto
38 38
         ]);
39 39
 
40
-        file_put_contents($this->app->dir('app') . 'src/Service/EchoService.php', GenerateTest::SERVICE);
40
+        file_put_contents($this->app->dir('app').'src/Service/EchoService.php', GenerateTest::SERVICE);
41 41
     }
42 42
 
43 43
     public function tearDown()
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
 
47 47
         $fs = new Files();
48 48
 
49
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
50
-            $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
49
+        if ($fs->isDirectory($this->app->dir('app').'src/Service')){
50
+            $fs->deleteDirectory($this->app->dir('app').'src/Service');
51 51
         }
52 52
 
53
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
54
-            $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
53
+        if ($fs->isDirectory($this->app->dir('app').'src/GPBMetadata')){
54
+            $fs->deleteDirectory($this->app->dir('app').'src/GPBMetadata');
55 55
         }
56 56
     }
57 57
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $msg->setMsg("hello");
78 78
 
79 79
         $w->shouldReceive('receive')->once()->with(
80
-            \Mockery::on(function (&$context) {
80
+            \Mockery::on(function (&$context){
81 81
                 $context = '{
82 82
                   "service": "service.Echo",
83 83
                   "method": "Ping"               
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         )->andReturn($msg->serializeToString());
89 89
 
90 90
         $w->shouldReceive('send')->once()->with(
91
-            \Mockery::on(function ($out) {
91
+            \Mockery::on(function ($out){
92 92
 
93 93
                 $msg = new Message();
94 94
                 $msg->mergeFromString($out);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         // one command only
102 102
         $w->shouldReceive('receive')->once()->with(
103
-            \Mockery::on(function (&$context) {
103
+            \Mockery::on(function (&$context){
104 104
                 $context = null;
105 105
                 return true;
106 106
             })
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $msg->setMsg("hello");
121 121
 
122 122
         $w->shouldReceive('receive')->once()->with(
123
-            \Mockery::on(function (&$context) {
123
+            \Mockery::on(function (&$context){
124 124
                 $context = '{
125 125
                   "service": "service.Echo",
126 126
                   "method": "Invalid"               
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         )->andReturn($msg->serializeToString());
132 132
 
133 133
         $w->shouldReceive('error')->once()->with(
134
-            \Mockery::on(function ($out) {
134
+            \Mockery::on(function ($out){
135 135
                 $this->assertContains('Method `Invalid` not found', $out);
136 136
                 return true;
137 137
             })
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
         // one command only
141 141
         $w->shouldReceive('receive')->once()->with(
142
-            \Mockery::on(function (&$context) {
142
+            \Mockery::on(function (&$context){
143 143
                 $context = null;
144 144
                 return true;
145 145
             })
Please login to merge, or discard this patch.
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
     public function setUp()
22 22
     {
23 23
         exec('protoc 2>&1', $out);
24
-        if (strpos(join("\n", $out), '--php_out') === false) {
24
+        if (strpos(join("\n", $out), '--php_out') === false)
25
+        {
25 26
             $this->markTestSkipped('Protoc binary is missing');
26 27
         }
27 28
 
@@ -46,11 +47,13 @@  discard block
 block discarded – undo
46 47
 
47 48
         $fs = new Files();
48 49
 
49
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
50
+        if ($fs->isDirectory($this->app->dir('app') . 'src/Service'))
51
+        {
50 52
             $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
51 53
         }
52 54
 
53
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
55
+        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata'))
56
+        {
54 57
             $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
55 58
         }
56 59
     }
@@ -77,7 +80,8 @@  discard block
 block discarded – undo
77 80
         $msg->setMsg("hello");
78 81
 
79 82
         $w->shouldReceive('receive')->once()->with(
80
-            \Mockery::on(function (&$context) {
83
+            \Mockery::on(function (&$context)
84
+            {
81 85
                 $context = '{
82 86
                   "service": "service.Echo",
83 87
                   "method": "Ping"               
@@ -88,7 +92,8 @@  discard block
 block discarded – undo
88 92
         )->andReturn($msg->serializeToString());
89 93
 
90 94
         $w->shouldReceive('send')->once()->with(
91
-            \Mockery::on(function ($out) {
95
+            \Mockery::on(function ($out)
96
+            {
92 97
 
93 98
                 $msg = new Message();
94 99
                 $msg->mergeFromString($out);
@@ -100,7 +105,8 @@  discard block
 block discarded – undo
100 105
 
101 106
         // one command only
102 107
         $w->shouldReceive('receive')->once()->with(
103
-            \Mockery::on(function (&$context) {
108
+            \Mockery::on(function (&$context)
109
+            {
104 110
                 $context = null;
105 111
                 return true;
106 112
             })
@@ -120,7 +126,8 @@  discard block
 block discarded – undo
120 126
         $msg->setMsg("hello");
121 127
 
122 128
         $w->shouldReceive('receive')->once()->with(
123
-            \Mockery::on(function (&$context) {
129
+            \Mockery::on(function (&$context)
130
+            {
124 131
                 $context = '{
125 132
                   "service": "service.Echo",
126 133
                   "method": "Invalid"               
@@ -131,7 +138,8 @@  discard block
 block discarded – undo
131 138
         )->andReturn($msg->serializeToString());
132 139
 
133 140
         $w->shouldReceive('error')->once()->with(
134
-            \Mockery::on(function ($out) {
141
+            \Mockery::on(function ($out)
142
+            {
135 143
                 $this->assertContains('Method `Invalid` not found', $out);
136 144
                 return true;
137 145
             })
@@ -139,7 +147,8 @@  discard block
 block discarded – undo
139 147
 
140 148
         // one command only
141 149
         $w->shouldReceive('receive')->once()->with(
142
-            \Mockery::on(function (&$context) {
150
+            \Mockery::on(function (&$context)
151
+            {
143 152
                 $context = null;
144 153
                 return true;
145 154
             })
Please login to merge, or discard this patch.
tests/Framework/GRPC/GenerateTest.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@  discard block
 block discarded – undo
32 32
     public function setUp()
33 33
     {
34 34
         exec('protoc 2>&1', $out);
35
-        if (strpos(join("\n", $out), '--php_out') === false) {
35
+        if (strpos(join("\n", $out), '--php_out') === false)
36
+        {
36 37
             $this->markTestSkipped('Protoc binary is missing');
37 38
         }
38 39
 
@@ -51,11 +52,13 @@  discard block
 block discarded – undo
51 52
 
52 53
         $fs = new Files();
53 54
 
54
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
55
+        if ($fs->isDirectory($this->app->dir('app') . 'src/Service'))
56
+        {
55 57
             $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
56 58
         }
57 59
 
58
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
60
+        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata'))
61
+        {
59 62
             $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
60 63
         }
61 64
     }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
     public function setUp()
34 34
     {
35 35
         exec('protoc 2>&1', $out);
36
-        if (strpos(join("\n", $out), '--php_out') === false) {
36
+        if (strpos(join("\n", $out), '--php_out') === false){
37 37
             $this->markTestSkipped('Protoc binary is missing');
38 38
         }
39 39
 
40 40
         parent::setUp();
41 41
 
42 42
         $fs = new Files();
43
-        $this->proto = $fs->normalizePath($this->app->dir('app') . 'proto/service.proto');
43
+        $this->proto = $fs->normalizePath($this->app->dir('app').'proto/service.proto');
44 44
 
45 45
         // protoc can't figure relative paths
46 46
         $this->proto = str_replace('Framework/../', '', $this->proto);
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 
53 53
         $fs = new Files();
54 54
 
55
-        if ($fs->isDirectory($this->app->dir('app') . 'src/Service')) {
56
-            $fs->deleteDirectory($this->app->dir('app') . 'src/Service');
55
+        if ($fs->isDirectory($this->app->dir('app').'src/Service')){
56
+            $fs->deleteDirectory($this->app->dir('app').'src/Service');
57 57
         }
58 58
 
59
-        if ($fs->isDirectory($this->app->dir('app') . 'src/GPBMetadata')) {
60
-            $fs->deleteDirectory($this->app->dir('app') . 'src/GPBMetadata');
59
+        if ($fs->isDirectory($this->app->dir('app').'src/GPBMetadata')){
60
+            $fs->deleteDirectory($this->app->dir('app').'src/GPBMetadata');
61 61
         }
62 62
     }
63 63
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
             'proto' => $this->proto
86 86
         ]);
87 87
 
88
-        $this->assertFileExists($this->app->dir('app') . 'src/Service/EchoInterface.php');
89
-        $this->assertFileExists($this->app->dir('app') . 'src/Service/Sub/Message.php');
90
-        $this->assertFileExists($this->app->dir('app') . 'src/GPBMetadata/Service.php');
88
+        $this->assertFileExists($this->app->dir('app').'src/Service/EchoInterface.php');
89
+        $this->assertFileExists($this->app->dir('app').'src/Service/Sub/Message.php');
90
+        $this->assertFileExists($this->app->dir('app').'src/GPBMetadata/Service.php');
91 91
     }
92 92
 }
93 93
\ No newline at end of file
Please login to merge, or discard this patch.
src/GRPC/ProtoCompiler.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
 
59 59
         $output = trim(join("\n", $output), "\n ,");
60 60
 
61
-        if ($output !== '') {
61
+        if ($output !== ''){
62 62
             $this->files->deleteDirectory($tmpDir);
63 63
             throw new CompileException($output);
64 64
         }
65 65
 
66 66
         // copying files (using relative path and namespace)
67 67
         $result = [];
68
-        foreach ($this->files->getFiles($tmpDir) as $file) {
68
+        foreach ($this->files->getFiles($tmpDir) as $file){
69 69
             $result[] = $this->copy($tmpDir, $file);
70 70
         }
71 71
 
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
     private function copy(string $tmpDir, string $file): string
83 83
     {
84 84
         $source = ltrim($this->files->relativePath($file, $tmpDir), '\\/');
85
-        if (strpos($source, $this->baseNamespace) === 0) {
85
+        if (strpos($source, $this->baseNamespace) === 0){
86 86
             $source = ltrim(substr($source, strlen($this->baseNamespace)), '\\/');
87 87
         }
88 88
 
89
-        $target = $this->files->normalizePath($this->basePath . '/' . $source);
89
+        $target = $this->files->normalizePath($this->basePath.'/'.$source);
90 90
 
91 91
         $this->files->ensureDirectory(dirname($target));
92 92
         $this->files->copy($file, $target);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     private function tmpDir(): string
101 101
     {
102
-        $directory = sys_get_temp_dir() . '/' . spl_object_hash($this);
102
+        $directory = sys_get_temp_dir().'/'.spl_object_hash($this);
103 103
         $this->files->ensureDirectory($directory);
104 104
 
105 105
         return $this->files->normalizePath($directory, true);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     private function getProtoFiles(string $protoFile): array
115 115
     {
116
-        return array_filter($this->files->getFiles(dirname($protoFile)), function ($file) {
116
+        return array_filter($this->files->getFiles(dirname($protoFile)), function ($file){
117 117
             return strpos($file, '.proto') !== false;
118 118
         });
119 119
     }
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,14 +58,16 @@  discard block
 block discarded – undo
58 58
 
59 59
         $output = trim(join("\n", $output), "\n ,");
60 60
 
61
-        if ($output !== '') {
61
+        if ($output !== '')
62
+        {
62 63
             $this->files->deleteDirectory($tmpDir);
63 64
             throw new CompileException($output);
64 65
         }
65 66
 
66 67
         // copying files (using relative path and namespace)
67 68
         $result = [];
68
-        foreach ($this->files->getFiles($tmpDir) as $file) {
69
+        foreach ($this->files->getFiles($tmpDir) as $file)
70
+        {
69 71
             $result[] = $this->copy($tmpDir, $file);
70 72
         }
71 73
 
@@ -82,7 +84,8 @@  discard block
 block discarded – undo
82 84
     private function copy(string $tmpDir, string $file): string
83 85
     {
84 86
         $source = ltrim($this->files->relativePath($file, $tmpDir), '\\/');
85
-        if (strpos($source, $this->baseNamespace) === 0) {
87
+        if (strpos($source, $this->baseNamespace) === 0)
88
+        {
86 89
             $source = ltrim(substr($source, strlen($this->baseNamespace)), '\\/');
87 90
         }
88 91
 
@@ -113,7 +116,8 @@  discard block
 block discarded – undo
113 116
      */
114 117
     private function getProtoFiles(string $protoFile): array
115 118
     {
116
-        return array_filter($this->files->getFiles(dirname($protoFile)), function ($file) {
119
+        return array_filter($this->files->getFiles(dirname($protoFile)), function ($file)
120
+        {
117 121
             return strpos($file, '.proto') !== false;
118 122
         });
119 123
     }
Please login to merge, or discard this patch.
src/Console/ConsoleDispatcher.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         EnvironmentInterface $env,
45 45
         FinalizerInterface $finalizer,
46 46
         ContainerInterface $container
47
-    ) {
47
+    ){
48 48
         $this->env = $env;
49 49
         $this->finalizer = $finalizer;
50 50
         $this->container = $container;
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
         /** @var Console $console */
74 74
         $console = $this->container->get(Console::class);
75 75
 
76
-        try {
76
+        try{
77 77
             $console->start($input ?? new ArgvInput(), $output);
78
-        } catch (\Throwable $e) {
78
+        }catch (\Throwable $e){
79 79
             $this->handleException($e, $output);
80
-        } finally {
80
+        }finally{
81 81
             $listener->disable();
82 82
             $this->finalizer->finalize(false);
83 83
         }
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
      */
90 90
     protected function handleException(\Throwable $e, OutputInterface $output)
91 91
     {
92
-        try {
92
+        try{
93 93
             $this->container->get(SnapshotterInterface::class)->register($e);
94
-        } catch (\Throwable|ContainerExceptionInterface $se) {
94
+        }catch (\Throwable | ContainerExceptionInterface $se){
95 95
             // no need to notify when unable to register an exception
96 96
         }
97 97
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     private function mapVerbosity(OutputInterface $output): int
108 108
     {
109
-        if ($output->isDebug() || $output->isVeryVerbose()) {
109
+        if ($output->isDebug() || $output->isVeryVerbose()){
110 110
             return ConsoleHandler::VERBOSITY_DEBUG;
111 111
         }
112 112
 
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,11 +73,16 @@  discard block
 block discarded – undo
73 73
         /** @var Console $console */
74 74
         $console = $this->container->get(Console::class);
75 75
 
76
-        try {
76
+        try
77
+        {
77 78
             $console->start($input ?? new ArgvInput(), $output);
78
-        } catch (\Throwable $e) {
79
+        }
80
+        catch (\Throwable $e)
81
+        {
79 82
             $this->handleException($e, $output);
80
-        } finally {
83
+        }
84
+        finally
85
+        {
81 86
             $listener->disable();
82 87
             $this->finalizer->finalize(false);
83 88
         }
@@ -89,9 +94,12 @@  discard block
 block discarded – undo
89 94
      */
90 95
     protected function handleException(\Throwable $e, OutputInterface $output)
91 96
     {
92
-        try {
97
+        try
98
+        {
93 99
             $this->container->get(SnapshotterInterface::class)->register($e);
94
-        } catch (\Throwable|ContainerExceptionInterface $se) {
100
+        }
101
+        catch (\Throwable|ContainerExceptionInterface $se)
102
+        {
95 103
             // no need to notify when unable to register an exception
96 104
         }
97 105
 
@@ -106,7 +114,8 @@  discard block
 block discarded – undo
106 114
      */
107 115
     private function mapVerbosity(OutputInterface $output): int
108 116
     {
109
-        if ($output->isDebug() || $output->isVeryVerbose()) {
117
+        if ($output->isDebug() || $output->isVeryVerbose())
118
+        {
110 119
             return ConsoleHandler::VERBOSITY_DEBUG;
111 120
         }
112 121
 
Please login to merge, or discard this patch.
functions.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 use Spiral\Debug\Dumper;
11 11
 
12
-if (!function_exists('bind')) {
12
+if (!function_exists('bind')){
13 13
     /**
14 14
      * Shortcut to container Autowire definition.
15 15
      *
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     }
28 28
 }
29 29
 
30
-if (!function_exists('dumprr')) {
30
+if (!function_exists('dumprr')){
31 31
     /**
32 32
      * Dumprr is similar to Dump function but always redirect output to STDERR.
33 33
      *
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,8 @@  discard block
 block discarded – undo
9 9
 
10 10
 use Spiral\Debug\Dumper;
11 11
 
12
-if (!function_exists('bind')) {
12
+if (!function_exists('bind'))
13
+{
13 14
     /**
14 15
      * Shortcut to container Autowire definition.
15 16
      *
@@ -27,7 +28,8 @@  discard block
 block discarded – undo
27 28
     }
28 29
 }
29 30
 
30
-if (!function_exists('dumprr')) {
31
+if (!function_exists('dumprr'))
32
+{
31 33
     /**
32 34
      * Dumprr is similar to Dump function but always redirect output to STDERR.
33 35
      *
Please login to merge, or discard this patch.
src/Command/Cycle/SyncCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         SchemaBootloader $bootloader,
32 32
         Registry $registry,
33 33
         MemoryInterface $memory
34
-    ) {
34
+    ){
35 35
         $show = new ShowChanges($this->output);
36 36
 
37 37
         $schema = (new Compiler())->compile(
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         $memory->saveData('cycle', $schema);
43 43
 
44
-        if ($show->hasChanges()) {
44
+        if ($show->hasChanges()){
45 45
             $this->writeln("\n<info>ORM Schema has been synchronized</info>");
46 46
         }
47 47
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@
 block discarded – undo
41 41
 
42 42
         $memory->saveData('cycle', $schema);
43 43
 
44
-        if ($show->hasChanges()) {
44
+        if ($show->hasChanges())
45
+        {
45 46
             $this->writeln("\n<info>ORM Schema has been synchronized</info>");
46 47
         }
47 48
 
Please login to merge, or discard this patch.
src/Http/Diactoros/ResponseFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $response = new Response('php://memory', $code, []);
39 39
         $response = $response->withStatus($code, $reasonPhrase);
40 40
 
41
-        foreach ($this->config->baseHeaders() as $header => $value) {
41
+        foreach ($this->config->baseHeaders() as $header => $value){
42 42
             $response = $response->withAddedHeader($header, $value);
43 43
         }
44 44
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@
 block discarded – undo
38 38
         $response = new Response('php://memory', $code, []);
39 39
         $response = $response->withStatus($code, $reasonPhrase);
40 40
 
41
-        foreach ($this->config->baseHeaders() as $header => $value) {
41
+        foreach ($this->config->baseHeaders() as $header => $value)
42
+        {
42 43
             $response = $response->withAddedHeader($header, $value);
43 44
         }
44 45
 
Please login to merge, or discard this patch.
src/Http/Diactoros/UploadedFileFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         string $clientFilename = null,
27 27
         string $clientMediaType = null
28 28
     ): UploadedFileInterface {
29
-        if ($size === null) {
29
+        if ($size === null){
30 30
             $size = $stream->getSize();
31 31
         }
32 32
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@
 block discarded – undo
26 26
         string $clientFilename = null,
27 27
         string $clientMediaType = null
28 28
     ): UploadedFileInterface {
29
-        if ($size === null) {
29
+        if ($size === null)
30
+        {
30 31
             $size = $stream->getSize();
31 32
         }
32 33
 
Please login to merge, or discard this patch.