Completed
Push — master ( 15285e...ad435c )
by Valentin
05:53
created
src/Console/ConsoleDispatcher.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         EnvironmentInterface $env,
49 49
         FinalizerInterface $finalizer,
50 50
         ContainerInterface $container
51
-    ) {
51
+    ){
52 52
         $this->env = $env;
53 53
         $this->finalizer = $finalizer;
54 54
         $this->container = $container;
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
         $console = $this->container->get(Console::class);
81 81
 
82 82
         $code = 0;
83
-        try {
83
+        try{
84 84
             $code = $console->start($input ?? new ArgvInput(), $output);
85
-        } catch (Throwable $e) {
85
+        }catch (Throwable $e){
86 86
             $this->handleException($e, $output);
87
-        } finally {
87
+        }finally{
88 88
             $listener->disable();
89 89
             $this->finalizer->finalize(false);
90 90
         }
91 91
 
92
-        if ($exit) {
92
+        if ($exit){
93 93
             exit($code);
94 94
         }
95 95
     }
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
      */
101 101
     protected function handleException(Throwable $e, OutputInterface $output): void
102 102
     {
103
-        try {
103
+        try{
104 104
             $this->container->get(SnapshotterInterface::class)->register($e);
105
-        } catch (Throwable | ContainerExceptionInterface $se) {
105
+        }catch (Throwable | ContainerExceptionInterface $se){
106 106
             // no need to notify when unable to register an exception
107 107
         }
108 108
 
@@ -117,11 +117,11 @@  discard block
 block discarded – undo
117 117
      */
118 118
     private function mapVerbosity(OutputInterface $output): int
119 119
     {
120
-        if ($output->isDebug()) {
120
+        if ($output->isDebug()){
121 121
             return ConsoleHandler::VERBOSITY_DEBUG;
122 122
         }
123 123
 
124
-        if ($output->isVeryVerbose()) {
124
+        if ($output->isVeryVerbose()){
125 125
             return ConsoleHandler::VERBOSITY_VERBOSE;
126 126
         }
127 127
 
Please login to merge, or discard this patch.
Braces   +19 added lines, -8 removed lines patch added patch discarded remove patch
@@ -80,16 +80,22 @@  discard block
 block discarded – undo
80 80
         $console = $this->container->get(Console::class);
81 81
 
82 82
         $code = 0;
83
-        try {
83
+        try
84
+        {
84 85
             $code = $console->start($input ?? new ArgvInput(), $output);
85
-        } catch (Throwable $e) {
86
+        }
87
+        catch (Throwable $e)
88
+        {
86 89
             $this->handleException($e, $output);
87
-        } finally {
90
+        }
91
+        finally
92
+        {
88 93
             $listener->disable();
89 94
             $this->finalizer->finalize(false);
90 95
         }
91 96
 
92
-        if ($exit) {
97
+        if ($exit)
98
+        {
93 99
             exit($code);
94 100
         }
95 101
     }
@@ -100,9 +106,12 @@  discard block
 block discarded – undo
100 106
      */
101 107
     protected function handleException(Throwable $e, OutputInterface $output): void
102 108
     {
103
-        try {
109
+        try
110
+        {
104 111
             $this->container->get(SnapshotterInterface::class)->register($e);
105
-        } catch (Throwable | ContainerExceptionInterface $se) {
112
+        }
113
+        catch (Throwable | ContainerExceptionInterface $se)
114
+        {
106 115
             // no need to notify when unable to register an exception
107 116
         }
108 117
 
@@ -117,11 +126,13 @@  discard block
 block discarded – undo
117 126
      */
118 127
     private function mapVerbosity(OutputInterface $output): int
119 128
     {
120
-        if ($output->isDebug()) {
129
+        if ($output->isDebug())
130
+        {
121 131
             return ConsoleHandler::VERBOSITY_DEBUG;
122 132
         }
123 133
 
124
-        if ($output->isVeryVerbose()) {
134
+        if ($output->isVeryVerbose())
135
+        {
125 136
             return ConsoleHandler::VERBOSITY_VERBOSE;
126 137
         }
127 138
 
Please login to merge, or discard this patch.