Passed
Push — master ( ca1bbc...694bee )
by Anton
04:02 queued 01:36
created
src/Command/Views/CompileCommand.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
         $generator = new ContextGenerator($views->getContext());
35 35
 
36 36
         $contexts = $generator->generate();
37
-        if (empty($contexts)) {
37
+        if (empty($contexts)){
38 38
             $contexts[] = $views->getContext();
39 39
         }
40 40
 
41
-        foreach ($contexts as $context) {
42
-            foreach ($views->getEngines() as $engine) {
43
-                if ($engine instanceof NativeEngine) {
41
+        foreach ($contexts as $context){
42
+            foreach ($views->getEngines() as $engine){
43
+                if ($engine instanceof NativeEngine){
44 44
                     // no need to compile
45 45
                     continue;
46 46
                 }
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
             $this->describeContext($context) ?? 'default'
65 65
         );
66 66
 
67
-        foreach ($engine->getLoader()->list() as $path) {
67
+        foreach ($engine->getLoader()->list() as $path){
68 68
             $start = microtime(true);
69
-            try {
69
+            try{
70 70
                 $engine->reset($path, $context);
71 71
                 $engine->compile($path, $context);
72 72
 
73
-                if ($this->isVerbose()) {
73
+                if ($this->isVerbose()){
74 74
                     $this->sprintf('<info>•</info> %s', $path);
75 75
                 }
76
-            } catch (\Throwable $e) {
76
+            }catch (\Throwable $e){
77 77
                 $this->renderError($path, $e);
78 78
                 continue;
79
-            } finally {
79
+            }finally{
80 80
                 $this->renderElapsed($start);
81 81
             }
82 82
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function renderError(string $path, \Throwable $e): void
92 92
     {
93
-        if (!$this->isVerbose()) {
93
+        if (!$this->isVerbose()){
94 94
             return;
95 95
         }
96 96
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $values = [];
112 112
 
113
-        foreach ($context->getDependencies() as $dependency) {
113
+        foreach ($context->getDependencies() as $dependency){
114 114
             $values[] = sprintf(
115 115
                 '%s%s%s:%s%s%s',
116 116
                 Color::LIGHT_WHITE,
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
      */
142 142
     private function renderSuccess(string $lastPath = null): void
143 143
     {
144
-        if (!$this->isVerbose()) {
144
+        if (!$this->isVerbose()){
145 145
             return;
146 146
         }
147 147
 
148
-        if ($lastPath === null) {
148
+        if ($lastPath === null){
149 149
             $this->writeln('• no views found');
150 150
         }
151 151
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     private function renderElapsed(float $start): void
159 159
     {
160
-        if (!$this->isVerbose()) {
160
+        if (!$this->isVerbose()){
161 161
             return;
162 162
         }
163 163
 
Please login to merge, or discard this patch.
Braces   +30 added lines, -14 removed lines patch added patch discarded remove patch
@@ -34,13 +34,17 @@  discard block
 block discarded – undo
34 34
         $generator = new ContextGenerator($views->getContext());
35 35
 
36 36
         $contexts = $generator->generate();
37
-        if (empty($contexts)) {
37
+        if (empty($contexts))
38
+        {
38 39
             $contexts[] = $views->getContext();
39 40
         }
40 41
 
41
-        foreach ($contexts as $context) {
42
-            foreach ($views->getEngines() as $engine) {
43
-                if ($engine instanceof NativeEngine) {
42
+        foreach ($contexts as $context)
43
+        {
44
+            foreach ($views->getEngines() as $engine)
45
+            {
46
+                if ($engine instanceof NativeEngine)
47
+                {
44 48
                     // no need to compile
45 49
                     continue;
46 50
                 }
@@ -64,19 +68,26 @@  discard block
 block discarded – undo
64 68
             $this->describeContext($context) ?? 'default'
65 69
         );
66 70
 
67
-        foreach ($engine->getLoader()->list() as $path) {
71
+        foreach ($engine->getLoader()->list() as $path)
72
+        {
68 73
             $start = microtime(true);
69
-            try {
74
+            try
75
+            {
70 76
                 $engine->reset($path, $context);
71 77
                 $engine->compile($path, $context);
72 78
 
73
-                if ($this->isVerbose()) {
79
+                if ($this->isVerbose())
80
+                {
74 81
                     $this->sprintf('<info>•</info> %s', $path);
75 82
                 }
76
-            } catch (\Throwable $e) {
83
+            }
84
+            catch (\Throwable $e)
85
+            {
77 86
                 $this->renderError($path, $e);
78 87
                 continue;
79
-            } finally {
88
+            }
89
+            finally
90
+            {
80 91
                 $this->renderElapsed($start);
81 92
             }
82 93
         }
@@ -90,7 +101,8 @@  discard block
 block discarded – undo
90 101
      */
91 102
     protected function renderError(string $path, \Throwable $e): void
92 103
     {
93
-        if (!$this->isVerbose()) {
104
+        if (!$this->isVerbose())
105
+        {
94 106
             return;
95 107
         }
96 108
 
@@ -110,7 +122,8 @@  discard block
 block discarded – undo
110 122
     {
111 123
         $values = [];
112 124
 
113
-        foreach ($context->getDependencies() as $dependency) {
125
+        foreach ($context->getDependencies() as $dependency)
126
+        {
114 127
             $values[] = sprintf(
115 128
                 '%s%s%s:%s%s%s',
116 129
                 Color::LIGHT_WHITE,
@@ -141,11 +154,13 @@  discard block
 block discarded – undo
141 154
      */
142 155
     private function renderSuccess(string $lastPath = null): void
143 156
     {
144
-        if (!$this->isVerbose()) {
157
+        if (!$this->isVerbose())
158
+        {
145 159
             return;
146 160
         }
147 161
 
148
-        if ($lastPath === null) {
162
+        if ($lastPath === null)
163
+        {
149 164
             $this->writeln('• no views found');
150 165
         }
151 166
 
@@ -157,7 +172,8 @@  discard block
 block discarded – undo
157 172
      */
158 173
     private function renderElapsed(float $start): void
159 174
     {
160
-        if (!$this->isVerbose()) {
175
+        if (!$this->isVerbose())
176
+        {
161 177
             return;
162 178
         }
163 179
 
Please login to merge, or discard this patch.
src/Command/Migrate/ReplayCommand.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function perform(Console $console): void
29 29
     {
30
-        if (!$this->verifyEnvironment()) {
30
+        if (!$this->verifyEnvironment()){
31 31
             //Making sure we can safely migrate in this environment
32 32
             return;
33 33
         }
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
         $rollback = ['--force' => true];
36 36
         $migrate = ['--force' => true];
37 37
 
38
-        if ($this->option('all')) {
38
+        if ($this->option('all')){
39 39
             $rollback['--all'] = true;
40
-        } else {
40
+        }else{
41 41
             $migrate['--one'] = true;
42 42
         }
43 43
 
Please login to merge, or discard this patch.
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function perform(Console $console): void
29 29
     {
30
-        if (!$this->verifyEnvironment()) {
30
+        if (!$this->verifyEnvironment())
31
+        {
31 32
             //Making sure we can safely migrate in this environment
32 33
             return;
33 34
         }
@@ -35,9 +36,12 @@  discard block
 block discarded – undo
35 36
         $rollback = ['--force' => true];
36 37
         $migrate = ['--force' => true];
37 38
 
38
-        if ($this->option('all')) {
39
+        if ($this->option('all'))
40
+        {
39 41
             $rollback['--all'] = true;
40
-        } else {
42
+        }
43
+        else
44
+        {
41 45
             $migrate['--one'] = true;
42 46
         }
43 47
 
Please login to merge, or discard this patch.
src/Command/GRPC/ListCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $services = $locator->getServices();
27 27
 
28
-        if ($services === []) {
28
+        if ($services === []){
29 29
             $this->writeln('<comment>No GRPC services were found.</comment>');
30 30
             return;
31 31
         }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             'File:',
37 37
         ]);
38 38
 
39
-        foreach ($services as $interface => $instance) {
39
+        foreach ($services as $interface => $instance){
40 40
             $grid->addRow([
41 41
                 $interface::NAME,
42 42
                 get_class($instance),
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $services = $locator->getServices();
27 27
 
28
-        if ($services === []) {
28
+        if ($services === [])
29
+        {
29 30
             $this->writeln('<comment>No GRPC services were found.</comment>');
30 31
             return;
31 32
         }
@@ -36,7 +37,8 @@  discard block
 block discarded – undo
36 37
             'File:',
37 38
         ]);
38 39
 
39
-        foreach ($services as $interface => $instance) {
40
+        foreach ($services as $interface => $instance)
41
+        {
40 42
             $grid->addRow([
41 43
                 $interface::NAME,
42 44
                 get_class($instance),
Please login to merge, or discard this patch.
src/Command/GRPC/GenerateCommand.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function perform(KernelInterface $kernel, FilesInterface $files, DirectoriesInterface $dirs): void
41 41
     {
42 42
         $protoFile = $this->argument('proto');
43
-        if (!file_exists($protoFile)) {
43
+        if (!file_exists($protoFile)){
44 44
             $this->sprintf('<error>File `%s` not found.</error>', $protoFile);
45 45
             return;
46 46
         }
@@ -53,19 +53,19 @@  discard block
 block discarded – undo
53 53
 
54 54
         $this->sprintf("<info>Compiling <fg=cyan>`%s`</fg=cyan>:</info>\n", $protoFile);
55 55
 
56
-        try {
56
+        try{
57 57
             $result = $compiler->compile($protoFile);
58
-        } catch (\Throwable $e) {
58
+        }catch (\Throwable $e){
59 59
             $this->sprintf("<error>Error:</error> <fg=red>%s</fg=red>\n", $e->getMessage());
60 60
             return;
61 61
         }
62 62
 
63
-        if ($result === []) {
63
+        if ($result === []){
64 64
             $this->sprintf("<info>No files were generated.</info>\n", $protoFile);
65 65
             return;
66 66
         }
67 67
 
68
-        foreach ($result as $file) {
68
+        foreach ($result as $file){
69 69
             $this->sprintf(
70 70
                 "<fg=green>•</fg=green> %s%s%s\n",
71 71
                 Color::LIGHT_WHITE,
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function getPath(KernelInterface $kernel): string
85 85
     {
86 86
         $path = $this->argument('namespace');
87
-        if ($path !== 'auto') {
87
+        if ($path !== 'auto'){
88 88
             return $path;
89 89
         }
90 90
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     protected function getNamespace(KernelInterface $kernel): string
103 103
     {
104 104
         $namespace = $this->argument('namespace');
105
-        if ($namespace !== 'auto') {
105
+        if ($namespace !== 'auto'){
106 106
             return $namespace;
107 107
         }
108 108
 
Please login to merge, or discard this patch.
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@  discard block
 block discarded – undo
40 40
     public function perform(KernelInterface $kernel, FilesInterface $files, DirectoriesInterface $dirs): void
41 41
     {
42 42
         $protoFile = $this->argument('proto');
43
-        if (!file_exists($protoFile)) {
43
+        if (!file_exists($protoFile))
44
+        {
44 45
             $this->sprintf('<error>File `%s` not found.</error>', $protoFile);
45 46
             return;
46 47
         }
@@ -53,19 +54,24 @@  discard block
 block discarded – undo
53 54
 
54 55
         $this->sprintf("<info>Compiling <fg=cyan>`%s`</fg=cyan>:</info>\n", $protoFile);
55 56
 
56
-        try {
57
+        try
58
+        {
57 59
             $result = $compiler->compile($protoFile);
58
-        } catch (\Throwable $e) {
60
+        }
61
+        catch (\Throwable $e)
62
+        {
59 63
             $this->sprintf("<error>Error:</error> <fg=red>%s</fg=red>\n", $e->getMessage());
60 64
             return;
61 65
         }
62 66
 
63
-        if ($result === []) {
67
+        if ($result === [])
68
+        {
64 69
             $this->sprintf("<info>No files were generated.</info>\n", $protoFile);
65 70
             return;
66 71
         }
67 72
 
68
-        foreach ($result as $file) {
73
+        foreach ($result as $file)
74
+        {
69 75
             $this->sprintf(
70 76
                 "<fg=green>•</fg=green> %s%s%s\n",
71 77
                 Color::LIGHT_WHITE,
@@ -84,7 +90,8 @@  discard block
 block discarded – undo
84 90
     protected function getPath(KernelInterface $kernel): string
85 91
     {
86 92
         $path = $this->argument('namespace');
87
-        if ($path !== 'auto') {
93
+        if ($path !== 'auto')
94
+        {
88 95
             return $path;
89 96
         }
90 97
 
@@ -102,7 +109,8 @@  discard block
 block discarded – undo
102 109
     protected function getNamespace(KernelInterface $kernel): string
103 110
     {
104 111
         $namespace = $this->argument('namespace');
105
-        if ($namespace !== 'auto') {
112
+        if ($namespace !== 'auto')
113
+        {
106 114
             return $namespace;
107 115
         }
108 116
 
Please login to merge, or discard this patch.
src/Command/Encrypter/KeyCommand.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,21 +55,21 @@
 block discarded – undo
55 55
         $this->sprintf("<info>New encryption key:</info> <fg=cyan>%s</fg=cyan>\n", $key);
56 56
 
57 57
         $file = $this->option('mount');
58
-        if ($file === null) {
58
+        if ($file === null){
59 59
             return;
60 60
         }
61 61
 
62
-        if (!$files->exists($file)) {
62
+        if (!$files->exists($file)){
63 63
             $this->sprintf('<error>Unable to find `%s`</error>', $file);
64 64
             return;
65 65
         }
66 66
 
67 67
         $content = $files->read($file);
68 68
 
69
-        try {
69
+        try{
70 70
             $content = str_replace($this->option('placeholder'), $key, $content);
71 71
             $content = str_replace($enc->getKey(), $key, $content);
72
-        } catch (\Throwable $e) {
72
+        }catch (\Throwable $e){
73 73
             // current keys is not set
74 74
         }
75 75
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,21 +55,26 @@
 block discarded – undo
55 55
         $this->sprintf("<info>New encryption key:</info> <fg=cyan>%s</fg=cyan>\n", $key);
56 56
 
57 57
         $file = $this->option('mount');
58
-        if ($file === null) {
58
+        if ($file === null)
59
+        {
59 60
             return;
60 61
         }
61 62
 
62
-        if (!$files->exists($file)) {
63
+        if (!$files->exists($file))
64
+        {
63 65
             $this->sprintf('<error>Unable to find `%s`</error>', $file);
64 66
             return;
65 67
         }
66 68
 
67 69
         $content = $files->read($file);
68 70
 
69
-        try {
71
+        try
72
+        {
70 73
             $content = str_replace($this->option('placeholder'), $key, $content);
71 74
             $content = str_replace($enc->getKey(), $key, $content);
72
-        } catch (\Throwable $e) {
75
+        }
76
+        catch (\Throwable $e)
77
+        {
73 78
             // current keys is not set
74 79
         }
75 80
 
Please login to merge, or discard this patch.
src/Http/SapiDispatcher.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
         $http = $this->container->get(Http::class);
59 59
         $emitter = $emitter ?? $this->container->get(EmitterInterface::class);
60 60
 
61
-        try {
61
+        try{
62 62
             $response = $http->handle($this->initRequest());
63 63
             $emitter->emit($response);
64
-        } catch (\Throwable $e) {
64
+        }catch (\Throwable $e){
65 65
             $this->handleException($emitter, $e);
66
-        } finally {
66
+        }finally{
67 67
             $this->finalizer->finalize(false);
68 68
         }
69 69
     }
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $handler = new HtmlHandler();
86 86
 
87
-        try {
87
+        try{
88 88
             /** @var SnapshotInterface $snapshot */
89 89
             $this->container->get(SnapshotterInterface::class)->register($e);
90
-        } catch (\Throwable | ContainerExceptionInterface $se) {
90
+        }catch (\Throwable | ContainerExceptionInterface $se){
91 91
             // nothing to report
92 92
         }
93 93
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,12 +58,17 @@  discard block
 block discarded – undo
58 58
         $http = $this->container->get(Http::class);
59 59
         $emitter = $emitter ?? $this->container->get(EmitterInterface::class);
60 60
 
61
-        try {
61
+        try
62
+        {
62 63
             $response = $http->handle($this->initRequest());
63 64
             $emitter->emit($response);
64
-        } catch (\Throwable $e) {
65
+        }
66
+        catch (\Throwable $e)
67
+        {
65 68
             $this->handleException($emitter, $e);
66
-        } finally {
69
+        }
70
+        finally
71
+        {
67 72
             $this->finalizer->finalize(false);
68 73
         }
69 74
     }
@@ -84,10 +89,13 @@  discard block
 block discarded – undo
84 89
     {
85 90
         $handler = new HtmlHandler();
86 91
 
87
-        try {
92
+        try
93
+        {
88 94
             /** @var SnapshotInterface $snapshot */
89 95
             $this->container->get(SnapshotterInterface::class)->register($e);
90
-        } catch (\Throwable | ContainerExceptionInterface $se) {
96
+        }
97
+        catch (\Throwable | ContainerExceptionInterface $se)
98
+        {
91 99
             // nothing to report
92 100
         }
93 101
 
Please login to merge, or discard this patch.
src/Http/RrDispacher.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         FinalizerInterface $finalizer,
48 48
         ContainerInterface $container,
49 49
         FactoryInterface $factory
50
-    ) {
50
+    ){
51 51
         $this->env = $env;
52 52
         $this->finalizer = $finalizer;
53 53
         $this->container = $container;
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 
72 72
         /** @var Http $http */
73 73
         $http = $this->container->get(Http::class);
74
-        while ($request = $client->acceptRequest()) {
75
-            try {
74
+        while ($request = $client->acceptRequest()){
75
+            try{
76 76
                 $client->respond($http->handle($request));
77
-            } catch (\Throwable $e) {
77
+            }catch (\Throwable $e){
78 78
                 $this->handleException($client, $e);
79
-            } finally {
79
+            }finally{
80 80
                 $this->finalizer->finalize(false);
81 81
             }
82 82
         }
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $handler = new HtmlHandler();
92 92
 
93
-        try {
93
+        try{
94 94
             /** @var SnapshotInterface $snapshot */
95 95
             $snapshot = $this->container->get(SnapshotterInterface::class)->register($e);
96 96
             error_log($snapshot->getMessage());
97
-        } catch (\Throwable | ContainerExceptionInterface $se) {
97
+        }catch (\Throwable | ContainerExceptionInterface $se){
98 98
             error_log((string)$e);
99 99
         }
100 100
 
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,12 +71,18 @@  discard block
 block discarded – undo
71 71
 
72 72
         /** @var Http $http */
73 73
         $http = $this->container->get(Http::class);
74
-        while ($request = $client->acceptRequest()) {
75
-            try {
74
+        while ($request = $client->acceptRequest())
75
+        {
76
+            try
77
+            {
76 78
                 $client->respond($http->handle($request));
77
-            } catch (\Throwable $e) {
79
+            }
80
+            catch (\Throwable $e)
81
+            {
78 82
                 $this->handleException($client, $e);
79
-            } finally {
83
+            }
84
+            finally
85
+            {
80 86
                 $this->finalizer->finalize(false);
81 87
             }
82 88
         }
@@ -90,11 +96,14 @@  discard block
 block discarded – undo
90 96
     {
91 97
         $handler = new HtmlHandler();
92 98
 
93
-        try {
99
+        try
100
+        {
94 101
             /** @var SnapshotInterface $snapshot */
95 102
             $snapshot = $this->container->get(SnapshotterInterface::class)->register($e);
96 103
             error_log($snapshot->getMessage());
97
-        } catch (\Throwable | ContainerExceptionInterface $se) {
104
+        }
105
+        catch (\Throwable | ContainerExceptionInterface $se)
106
+        {
98 107
             error_log((string)$e);
99 108
         }
100 109
 
Please login to merge, or discard this patch.
src/Console/Sequence/RuntimeDirectory.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         $runtimeDirectory = $this->dirs->get('runtime');
46 46
 
47
-        if (!$this->files->exists($runtimeDirectory)) {
47
+        if (!$this->files->exists($runtimeDirectory)){
48 48
             $this->files->ensureDirectory($runtimeDirectory);
49 49
             $output->writeln('<comment>created</comment>');
50 50
             return;
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
         $output->writeln('<info>exists</info>');
53 53
         
54 54
 
55
-        foreach ($this->files->getFiles($runtimeDirectory) as $filename) {
56
-            try {
55
+        foreach ($this->files->getFiles($runtimeDirectory) as $filename){
56
+            try{
57 57
                 $this->files->setPermissions($filename, FilesInterface::RUNTIME);
58 58
                 $this->files->setPermissions(dirname($filename), FilesInterface::RUNTIME);
59
-            } catch (\Throwable $e) {
59
+            }catch (\Throwable $e){
60 60
                 // @codeCoverageIgnoreStart
61 61
                 $output->writeln(sprintf(
62 62
                     '<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>',
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 // @codeCoverageIgnoreEnd
68 68
             }
69 69
 
70
-            if ($output->isVerbose()) {
70
+            if ($output->isVerbose()){
71 71
                 $output->writeln(sprintf(
72 72
                     '<fg=green>[updated]</fg=green> `%s`',
73 73
                     $this->files->relativePath($filename, $runtimeDirectory)
Please login to merge, or discard this patch.
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@  discard block
 block discarded – undo
44 44
 
45 45
         $runtimeDirectory = $this->dirs->get('runtime');
46 46
 
47
-        if (!$this->files->exists($runtimeDirectory)) {
47
+        if (!$this->files->exists($runtimeDirectory))
48
+        {
48 49
             $this->files->ensureDirectory($runtimeDirectory);
49 50
             $output->writeln('<comment>created</comment>');
50 51
             return;
@@ -52,11 +53,15 @@  discard block
 block discarded – undo
52 53
         $output->writeln('<info>exists</info>');
53 54
         
54 55
 
55
-        foreach ($this->files->getFiles($runtimeDirectory) as $filename) {
56
-            try {
56
+        foreach ($this->files->getFiles($runtimeDirectory) as $filename)
57
+        {
58
+            try
59
+            {
57 60
                 $this->files->setPermissions($filename, FilesInterface::RUNTIME);
58 61
                 $this->files->setPermissions(dirname($filename), FilesInterface::RUNTIME);
59
-            } catch (\Throwable $e) {
62
+            }
63
+            catch (\Throwable $e)
64
+            {
60 65
                 // @codeCoverageIgnoreStart
61 66
                 $output->writeln(sprintf(
62 67
                     '<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>',
@@ -67,7 +72,8 @@  discard block
 block discarded – undo
67 72
                 // @codeCoverageIgnoreEnd
68 73
             }
69 74
 
70
-            if ($output->isVerbose()) {
75
+            if ($output->isVerbose())
76
+            {
71 77
                 $output->writeln(sprintf(
72 78
                     '<fg=green>[updated]</fg=green> `%s`',
73 79
                     $this->files->relativePath($filename, $runtimeDirectory)
Please login to merge, or discard this patch.
src/Console/ConsoleDispatcher.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         EnvironmentInterface $env,
48 48
         FinalizerInterface $finalizer,
49 49
         ContainerInterface $container
50
-    ) {
50
+    ){
51 51
         $this->env = $env;
52 52
         $this->finalizer = $finalizer;
53 53
         $this->container = $container;
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
         /** @var Console $console */
77 77
         $console = $this->container->get(Console::class);
78 78
 
79
-        try {
79
+        try{
80 80
             $console->start($input ?? new ArgvInput(), $output);
81
-        } catch (\Throwable $e) {
81
+        }catch (\Throwable $e){
82 82
             $this->handleException($e, $output);
83
-        } finally {
83
+        }finally{
84 84
             $listener->disable();
85 85
             $this->finalizer->finalize(false);
86 86
         }
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function handleException(\Throwable $e, OutputInterface $output): void
94 94
     {
95
-        try {
95
+        try{
96 96
             $this->container->get(SnapshotterInterface::class)->register($e);
97
-        } catch (\Throwable | ContainerExceptionInterface $se) {
97
+        }catch (\Throwable | ContainerExceptionInterface $se){
98 98
             // no need to notify when unable to register an exception
99 99
         }
100 100
 
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
      */
110 110
     private function mapVerbosity(OutputInterface $output): int
111 111
     {
112
-        if ($output->isDebug()) {
112
+        if ($output->isDebug()){
113 113
             return ConsoleHandler::VERBOSITY_DEBUG;
114 114
         }
115 115
 
116
-        if ($output->isVeryVerbose()) {
116
+        if ($output->isVeryVerbose()){
117 117
             return ConsoleHandler::VERBOSITY_VERBOSE;
118 118
         }
119 119
 
Please login to merge, or discard this patch.
Braces   +17 added lines, -7 removed lines patch added patch discarded remove patch
@@ -76,11 +76,16 @@  discard block
 block discarded – undo
76 76
         /** @var Console $console */
77 77
         $console = $this->container->get(Console::class);
78 78
 
79
-        try {
79
+        try
80
+        {
80 81
             $console->start($input ?? new ArgvInput(), $output);
81
-        } catch (\Throwable $e) {
82
+        }
83
+        catch (\Throwable $e)
84
+        {
82 85
             $this->handleException($e, $output);
83
-        } finally {
86
+        }
87
+        finally
88
+        {
84 89
             $listener->disable();
85 90
             $this->finalizer->finalize(false);
86 91
         }
@@ -92,9 +97,12 @@  discard block
 block discarded – undo
92 97
      */
93 98
     protected function handleException(\Throwable $e, OutputInterface $output): void
94 99
     {
95
-        try {
100
+        try
101
+        {
96 102
             $this->container->get(SnapshotterInterface::class)->register($e);
97
-        } catch (\Throwable | ContainerExceptionInterface $se) {
103
+        }
104
+        catch (\Throwable | ContainerExceptionInterface $se)
105
+        {
98 106
             // no need to notify when unable to register an exception
99 107
         }
100 108
 
@@ -109,11 +117,13 @@  discard block
 block discarded – undo
109 117
      */
110 118
     private function mapVerbosity(OutputInterface $output): int
111 119
     {
112
-        if ($output->isDebug()) {
120
+        if ($output->isDebug())
121
+        {
113 122
             return ConsoleHandler::VERBOSITY_DEBUG;
114 123
         }
115 124
 
116
-        if ($output->isVeryVerbose()) {
125
+        if ($output->isVeryVerbose())
126
+        {
117 127
             return ConsoleHandler::VERBOSITY_VERBOSE;
118 128
         }
119 129
 
Please login to merge, or discard this patch.