Completed
Push — master ( f8129e...33ac6d )
by Kirill
26s queued 21s
created
src/Reactor/src/Partial/Source.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function addLine(string $line): Source
68 68
     {
69
-        if (strpos($line, "\n") !== false) {
69
+        if (strpos($line, "\n") !== false){
70 70
             throw new MultilineException(
71 71
                 'New line character is forbidden in addLine method argument'
72 72
             );
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public static function normalizeEndings(string $string, bool $joinMultiple = true): string
134 134
     {
135
-        if (!$joinMultiple) {
135
+        if (!$joinMultiple){
136 136
             return str_replace("\r\n", "\n", $string);
137 137
         }
138 138
 
@@ -164,30 +164,30 @@  discard block
 block discarded – undo
164 164
         $string = self::normalizeEndings($string, false);
165 165
         $lines = explode("\n", $string);
166 166
         $minIndent = null;
167
-        foreach ($lines as $line) {
168
-            if (!trim($line)) {
167
+        foreach ($lines as $line){
168
+            if (!trim($line)){
169 169
                 continue;
170 170
             }
171 171
             $line = str_replace("\t", $tabulationCost, $line);
172 172
             //Getting indent size
173
-            if (!preg_match('/^( +)/', $line, $matches)) {
173
+            if (!preg_match('/^( +)/', $line, $matches)){
174 174
                 //Some line has no indent
175 175
                 return $string;
176 176
             }
177
-            if ($minIndent === null) {
177
+            if ($minIndent === null){
178 178
                 $minIndent = strlen($matches[1]);
179 179
             }
180 180
             $minIndent = min($minIndent, strlen($matches[1]));
181 181
         }
182 182
         //Fixing indent
183
-        foreach ($lines as &$line) {
184
-            if (empty($line)) {
183
+        foreach ($lines as &$line){
184
+            if (empty($line)){
185 185
                 continue;
186 186
             }
187 187
             //Getting line indent
188 188
             preg_match("/^([ \t]+)/", $line, $matches);
189 189
             $indent = $matches[1];
190
-            if (!trim($line)) {
190
+            if (!trim($line)){
191 191
                 $line = '';
192 192
                 continue;
193 193
             }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                 ' ',
197 197
                 strlen(str_replace("\t", $tabulationCost, $indent)) - $minIndent
198 198
             );
199
-            $line = $useIndent . substr($line, strlen($indent));
199
+            $line = $useIndent.substr($line, strlen($indent));
200 200
             unset($line);
201 201
         }
202 202
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     protected function fetchLines(string $string, bool $cutIndents): array
214 214
     {
215
-        if ($cutIndents) {
215
+        if ($cutIndents){
216 216
             $string = self::normalizeIndents($string, '');
217 217
         }
218 218
 
Please login to merge, or discard this patch.
Braces   +20 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,7 +66,8 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function addLine(string $line): Source
68 68
     {
69
-        if (strpos($line, "\n") !== false) {
69
+        if (strpos($line, "\n") !== false)
70
+        {
70 71
             throw new MultilineException(
71 72
                 'New line character is forbidden in addLine method argument'
72 73
             );
@@ -132,7 +133,8 @@  discard block
 block discarded – undo
132 133
      */
133 134
     public static function normalizeEndings(string $string, bool $joinMultiple = true): string
134 135
     {
135
-        if (!$joinMultiple) {
136
+        if (!$joinMultiple)
137
+        {
136 138
             return str_replace("\r\n", "\n", $string);
137 139
         }
138 140
 
@@ -164,30 +166,37 @@  discard block
 block discarded – undo
164 166
         $string = self::normalizeEndings($string, false);
165 167
         $lines = explode("\n", $string);
166 168
         $minIndent = null;
167
-        foreach ($lines as $line) {
168
-            if (!trim($line)) {
169
+        foreach ($lines as $line)
170
+        {
171
+            if (!trim($line))
172
+            {
169 173
                 continue;
170 174
             }
171 175
             $line = str_replace("\t", $tabulationCost, $line);
172 176
             //Getting indent size
173
-            if (!preg_match('/^( +)/', $line, $matches)) {
177
+            if (!preg_match('/^( +)/', $line, $matches))
178
+            {
174 179
                 //Some line has no indent
175 180
                 return $string;
176 181
             }
177
-            if ($minIndent === null) {
182
+            if ($minIndent === null)
183
+            {
178 184
                 $minIndent = strlen($matches[1]);
179 185
             }
180 186
             $minIndent = min($minIndent, strlen($matches[1]));
181 187
         }
182 188
         //Fixing indent
183
-        foreach ($lines as &$line) {
184
-            if (empty($line)) {
189
+        foreach ($lines as &$line)
190
+        {
191
+            if (empty($line))
192
+            {
185 193
                 continue;
186 194
             }
187 195
             //Getting line indent
188 196
             preg_match("/^([ \t]+)/", $line, $matches);
189 197
             $indent = $matches[1];
190
-            if (!trim($line)) {
198
+            if (!trim($line))
199
+            {
191 200
                 $line = '';
192 201
                 continue;
193 202
             }
@@ -212,7 +221,8 @@  discard block
 block discarded – undo
212 221
      */
213 222
     protected function fetchLines(string $string, bool $cutIndents): array
214 223
     {
215
-        if ($cutIndents) {
224
+        if ($cutIndents)
225
+        {
216 226
             $string = self::normalizeIndents($string, '');
217 227
         }
218 228
 
Please login to merge, or discard this patch.
src/Reactor/src/Aggregator.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function has(string $name): bool
86 86
     {
87
-        foreach ($this->elements as $element) {
88
-            if ($element instanceof NamedInterface && $element->getName() === $name) {
87
+        foreach ($this->elements as $element){
88
+            if ($element instanceof NamedInterface && $element->getName() === $name){
89 89
                 return true;
90 90
             }
91 91
         }
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
         $reflector = new ReflectionObject($element);
106 106
 
107 107
         $allowed = false;
108
-        foreach ($this->allowed as $class) {
109
-            if ($reflector->isSubclassOf($class) || get_class($element) === $class) {
108
+        foreach ($this->allowed as $class){
109
+            if ($reflector->isSubclassOf($class) || get_class($element) === $class){
110 110
                 $allowed = true;
111 111
                 break;
112 112
             }
113 113
         }
114 114
 
115
-        if (!$allowed) {
115
+        if (!$allowed){
116 116
             $type = get_class($element);
117 117
             throw new ReactorException("Elements with type '{$type}' are not allowed");
118 118
         }
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function remove(string $name): Aggregator
144 144
     {
145
-        foreach ($this->elements as $index => $element) {
146
-            if ($element instanceof NamedInterface && $element->getName() === $name) {
145
+        foreach ($this->elements as $index => $element){
146
+            if ($element instanceof NamedInterface && $element->getName() === $name){
147 147
                 unset($this->elements[$index]);
148 148
             }
149 149
         }
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public function replace($search, $replace): Aggregator
199 199
     {
200
-        foreach ($this->elements as $element) {
201
-            if ($element instanceof ReplaceableInterface) {
200
+        foreach ($this->elements as $element){
201
+            if ($element instanceof ReplaceableInterface){
202 202
                 $element->replace($search, $replace);
203 203
             }
204 204
         }
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
     {
214 214
         $result = '';
215 215
 
216
-        foreach ($this->elements as $element) {
217
-            $result .= $element->render($indentLevel) . "\n\n";
216
+        foreach ($this->elements as $element){
217
+            $result .= $element->render($indentLevel)."\n\n";
218 218
         }
219 219
 
220 220
         return rtrim($result, "\n");
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
      */
230 230
     protected function find(string $name): DeclarationInterface
231 231
     {
232
-        foreach ($this->elements as $element) {
233
-            if ($element instanceof NamedInterface && $element->getName() === $name) {
232
+        foreach ($this->elements as $element){
233
+            if ($element instanceof NamedInterface && $element->getName() === $name){
234 234
                 return $element;
235 235
             }
236 236
         }
Please login to merge, or discard this patch.
Braces   +24 added lines, -12 removed lines patch added patch discarded remove patch
@@ -84,8 +84,10 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function has(string $name): bool
86 86
     {
87
-        foreach ($this->elements as $element) {
88
-            if ($element instanceof NamedInterface && $element->getName() === $name) {
87
+        foreach ($this->elements as $element)
88
+        {
89
+            if ($element instanceof NamedInterface && $element->getName() === $name)
90
+            {
89 91
                 return true;
90 92
             }
91 93
         }
@@ -105,14 +107,17 @@  discard block
 block discarded – undo
105 107
         $reflector = new ReflectionObject($element);
106 108
 
107 109
         $allowed = false;
108
-        foreach ($this->allowed as $class) {
109
-            if ($reflector->isSubclassOf($class) || get_class($element) === $class) {
110
+        foreach ($this->allowed as $class)
111
+        {
112
+            if ($reflector->isSubclassOf($class) || get_class($element) === $class)
113
+            {
110 114
                 $allowed = true;
111 115
                 break;
112 116
             }
113 117
         }
114 118
 
115
-        if (!$allowed) {
119
+        if (!$allowed)
120
+        {
116 121
             $type = get_class($element);
117 122
             throw new ReactorException("Elements with type '{$type}' are not allowed");
118 123
         }
@@ -142,8 +147,10 @@  discard block
 block discarded – undo
142 147
      */
143 148
     public function remove(string $name): Aggregator
144 149
     {
145
-        foreach ($this->elements as $index => $element) {
146
-            if ($element instanceof NamedInterface && $element->getName() === $name) {
150
+        foreach ($this->elements as $index => $element)
151
+        {
152
+            if ($element instanceof NamedInterface && $element->getName() === $name)
153
+            {
147 154
                 unset($this->elements[$index]);
148 155
             }
149 156
         }
@@ -197,8 +204,10 @@  discard block
 block discarded – undo
197 204
      */
198 205
     public function replace($search, $replace): Aggregator
199 206
     {
200
-        foreach ($this->elements as $element) {
201
-            if ($element instanceof ReplaceableInterface) {
207
+        foreach ($this->elements as $element)
208
+        {
209
+            if ($element instanceof ReplaceableInterface)
210
+            {
202 211
                 $element->replace($search, $replace);
203 212
             }
204 213
         }
@@ -213,7 +222,8 @@  discard block
 block discarded – undo
213 222
     {
214 223
         $result = '';
215 224
 
216
-        foreach ($this->elements as $element) {
225
+        foreach ($this->elements as $element)
226
+        {
217 227
             $result .= $element->render($indentLevel) . "\n\n";
218 228
         }
219 229
 
@@ -229,8 +239,10 @@  discard block
 block discarded – undo
229 239
      */
230 240
     protected function find(string $name): DeclarationInterface
231 241
     {
232
-        foreach ($this->elements as $element) {
233
-            if ($element instanceof NamedInterface && $element->getName() === $name) {
242
+        foreach ($this->elements as $element)
243
+        {
244
+            if ($element instanceof NamedInterface && $element->getName() === $name)
245
+            {
234 246
                 return $element;
235 247
             }
236 248
         }
Please login to merge, or discard this patch.
src/Reactor/src/Aggregator/Methods.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
      */
39 39
     public function get(string $name): Method
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name)){
42 42
             //Automatically creating constant
43 43
             $method = new Method($name);
44 44
             $this->add($method);
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
      */
39 39
     public function get(string $name): Method
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name))
42
+        {
42 43
             //Automatically creating constant
43 44
             $method = new Method($name);
44 45
             $this->add($method);
Please login to merge, or discard this patch.
src/Reactor/src/Aggregator/Parameters.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function get(string $name): Parameter
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name)){
42 42
             //Automatically creating constant
43 43
             $parameter = new Parameter($name);
44 44
             $this->add($parameter);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
          * Overwriting parent call.
59 59
          */
60 60
         $parameters = [];
61
-        foreach ($this->getIterator() as $element) {
61
+        foreach ($this->getIterator() as $element){
62 62
             $parameters[] = $element->render(0);
63 63
         }
64 64
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function get(string $name): Parameter
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name))
42
+        {
42 43
             //Automatically creating constant
43 44
             $parameter = new Parameter($name);
44 45
             $this->add($parameter);
@@ -58,7 +59,8 @@  discard block
 block discarded – undo
58 59
          * Overwriting parent call.
59 60
          */
60 61
         $parameters = [];
61
-        foreach ($this->getIterator() as $element) {
62
+        foreach ($this->getIterator() as $element)
63
+        {
62 64
             $parameters[] = $element->render(0);
63 65
         }
64 66
 
Please login to merge, or discard this patch.
src/Reactor/src/Aggregator/Constants.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
      */
39 39
     public function get(string $name): Constant
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name)){
42 42
             $constant = new Constant($name, null);
43 43
             $this->add($constant);
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
      */
39 39
     public function get(string $name): Constant
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name))
42
+        {
42 43
             $constant = new Constant($name, null);
43 44
             $this->add($constant);
44 45
 
Please login to merge, or discard this patch.
src/Reactor/src/Aggregator/Properties.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
      */
39 39
     public function get(string $name): Property
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name)){
42 42
             //Automatically creating constant
43 43
             $property = new Property($name);
44 44
             $this->add($property);
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
      */
39 39
     public function get(string $name): Property
40 40
     {
41
-        if (!$this->has($name)) {
41
+        if (!$this->has($name))
42
+        {
42 43
             //Automatically creating constant
43 44
             $property = new Property($name);
44 45
             $this->add($property);
Please login to merge, or discard this patch.
src/Views/src/ViewManager.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
             'namespaces' => $config->getNamespaces(),
45 45
         ]);
46 46
 
47
-        foreach ($this->config->getDependencies() as $dependency) {
47
+        foreach ($this->config->getDependencies() as $dependency){
48 48
             $this->addDependency($dependency->resolve($factory));
49 49
         }
50 50
 
51
-        foreach ($this->config->getEngines() as $engine) {
51
+        foreach ($this->config->getEngines() as $engine){
52 52
             $this->addEngine($engine->resolve($factory));
53 53
         }
54 54
 
55
-        if ($this->config->isCacheEnabled()) {
55
+        if ($this->config->isCacheEnabled()){
56 56
             $this->cache = new ViewCache();
57 57
         }
58 58
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $this->engines[] = $engine->withLoader($this->loader);
86 86
 
87
-        uasort($this->engines, function (EngineInterface $a, EngineInterface $b) {
87
+        uasort($this->engines, function (EngineInterface $a, EngineInterface $b){
88 88
             return strcmp($a->getLoader()->getExtension(), $b->getLoader()->getExtension());
89 89
         });
90 90
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     public function compile(string $path): void
112 112
     {
113
-        if ($this->cache !== null) {
113
+        if ($this->cache !== null){
114 114
             $this->cache->resetPath($path);
115 115
         }
116 116
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
         // Rotate all possible context variants and warm up cache
120 120
         $generator = new ContextGenerator($this->context);
121
-        foreach ($generator->generate() as $context) {
121
+        foreach ($generator->generate() as $context){
122 122
             $engine->reset($path, $context);
123 123
             $engine->compile($path, $context);
124 124
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function reset(string $path): void
133 133
     {
134
-        if ($this->cache !== null) {
134
+        if ($this->cache !== null){
135 135
             $this->cache->resetPath($path);
136 136
         }
137 137
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
         // Rotate all possible context variants and warm up cache
141 141
         $generator = new ContextGenerator($this->context);
142
-        foreach ($generator->generate() as $context) {
142
+        foreach ($generator->generate() as $context){
143 143
             $engine->reset($path, $context);
144 144
         }
145 145
     }
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function get(string $path): ViewInterface
156 156
     {
157
-        if ($this->cache !== null && $this->cache->has($this->context, $path)) {
157
+        if ($this->cache !== null && $this->cache->has($this->context, $path)){
158 158
             return $this->cache->get($this->context, $path);
159 159
         }
160 160
 
161 161
         $view = $this->findEngine($path)->get($path, $this->context);
162 162
 
163
-        if ($this->cache !== null) {
163
+        if ($this->cache !== null){
164 164
             $this->cache->set($this->context, $path, $view);
165 165
         }
166 166
 
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
      */
188 188
     protected function findEngine(string $path): EngineInterface
189 189
     {
190
-        foreach ($this->engines as $engine) {
191
-            if ($engine->getLoader()->exists($path)) {
190
+        foreach ($this->engines as $engine){
191
+            if ($engine->getLoader()->exists($path)){
192 192
                 return $engine;
193 193
             }
194 194
         }
Please login to merge, or discard this patch.
Braces   +24 added lines, -12 removed lines patch added patch discarded remove patch
@@ -44,15 +44,18 @@  discard block
 block discarded – undo
44 44
             'namespaces' => $config->getNamespaces(),
45 45
         ]);
46 46
 
47
-        foreach ($this->config->getDependencies() as $dependency) {
47
+        foreach ($this->config->getDependencies() as $dependency)
48
+        {
48 49
             $this->addDependency($dependency->resolve($factory));
49 50
         }
50 51
 
51
-        foreach ($this->config->getEngines() as $engine) {
52
+        foreach ($this->config->getEngines() as $engine)
53
+        {
52 54
             $this->addEngine($engine->resolve($factory));
53 55
         }
54 56
 
55
-        if ($this->config->isCacheEnabled()) {
57
+        if ($this->config->isCacheEnabled())
58
+        {
56 59
             $this->cache = new ViewCache();
57 60
         }
58 61
     }
@@ -84,7 +87,8 @@  discard block
 block discarded – undo
84 87
     {
85 88
         $this->engines[] = $engine->withLoader($this->loader);
86 89
 
87
-        uasort($this->engines, function (EngineInterface $a, EngineInterface $b) {
90
+        uasort($this->engines, function (EngineInterface $a, EngineInterface $b)
91
+        {
88 92
             return strcmp($a->getLoader()->getExtension(), $b->getLoader()->getExtension());
89 93
         });
90 94
 
@@ -110,7 +114,8 @@  discard block
 block discarded – undo
110 114
      */
111 115
     public function compile(string $path): void
112 116
     {
113
-        if ($this->cache !== null) {
117
+        if ($this->cache !== null)
118
+        {
114 119
             $this->cache->resetPath($path);
115 120
         }
116 121
 
@@ -118,7 +123,8 @@  discard block
 block discarded – undo
118 123
 
119 124
         // Rotate all possible context variants and warm up cache
120 125
         $generator = new ContextGenerator($this->context);
121
-        foreach ($generator->generate() as $context) {
126
+        foreach ($generator->generate() as $context)
127
+        {
122 128
             $engine->reset($path, $context);
123 129
             $engine->compile($path, $context);
124 130
         }
@@ -131,7 +137,8 @@  discard block
 block discarded – undo
131 137
      */
132 138
     public function reset(string $path): void
133 139
     {
134
-        if ($this->cache !== null) {
140
+        if ($this->cache !== null)
141
+        {
135 142
             $this->cache->resetPath($path);
136 143
         }
137 144
 
@@ -139,7 +146,8 @@  discard block
 block discarded – undo
139 146
 
140 147
         // Rotate all possible context variants and warm up cache
141 148
         $generator = new ContextGenerator($this->context);
142
-        foreach ($generator->generate() as $context) {
149
+        foreach ($generator->generate() as $context)
150
+        {
143 151
             $engine->reset($path, $context);
144 152
         }
145 153
     }
@@ -154,13 +162,15 @@  discard block
 block discarded – undo
154 162
      */
155 163
     public function get(string $path): ViewInterface
156 164
     {
157
-        if ($this->cache !== null && $this->cache->has($this->context, $path)) {
165
+        if ($this->cache !== null && $this->cache->has($this->context, $path))
166
+        {
158 167
             return $this->cache->get($this->context, $path);
159 168
         }
160 169
 
161 170
         $view = $this->findEngine($path)->get($path, $this->context);
162 171
 
163
-        if ($this->cache !== null) {
172
+        if ($this->cache !== null)
173
+        {
164 174
             $this->cache->set($this->context, $path, $view);
165 175
         }
166 176
 
@@ -187,8 +197,10 @@  discard block
 block discarded – undo
187 197
      */
188 198
     protected function findEngine(string $path): EngineInterface
189 199
     {
190
-        foreach ($this->engines as $engine) {
191
-            if ($engine->getLoader()->exists($path)) {
200
+        foreach ($this->engines as $engine)
201
+        {
202
+            if ($engine->getLoader()->exists($path))
203
+            {
192 204
                 return $engine;
193 205
             }
194 206
         }
Please login to merge, or discard this patch.
src/Framework/Bootloader/Http/SessionBootloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
                 'handler'  => new Autowire(
64 64
                     FileHandler::class,
65 65
                     [
66
-                        'directory' => $directories->get('runtime') . 'session',
66
+                        'directory' => $directories->get('runtime').'session',
67 67
                         'lifetime'  => 86400,
68 68
                     ]
69 69
                 ),
Please login to merge, or discard this patch.
src/Framework/Command/Database/ListCommand.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function perform(DatabaseConfig $config, DatabaseManager $dbal): void
36 36
     {
37
-        if ($this->argument('db')) {
37
+        if ($this->argument('db')){
38 38
             $databases = [$this->argument('db')];
39
-        } else {
39
+        }else{
40 40
             $databases = array_keys($config->getDatabases());
41 41
         }
42 42
 
43
-        if (empty($databases)) {
43
+        if (empty($databases)){
44 44
             $this->writeln('<fg=red>No databases found.</fg=red>');
45 45
 
46 46
             return;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             ]
59 59
         );
60 60
 
61
-        foreach ($databases as $database) {
61
+        foreach ($databases as $database){
62 62
             $database = $dbal->database($database);
63 63
 
64 64
             /** @var Driver $driver */
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
                 $database->getPrefix() ?: '<comment>---</comment>',
72 72
             ];
73 73
 
74
-            try {
74
+            try{
75 75
                 $driver->connect();
76
-            } catch (\Exception $exception) {
76
+            }catch (\Exception $exception){
77 77
                 $this->renderException($grid, $header, $exception);
78 78
 
79
-                if ($database->getName() != end($databases)) {
79
+                if ($database->getName() != end($databases)){
80 80
                     $grid->addRow(new TableSeparator());
81 81
                 }
82 82
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
             $header[] = '<info>connected</info>';
87 87
             $this->renderTables($grid, $header, $database);
88
-            if ($database->getName() != end($databases)) {
88
+            if ($database->getName() != end($databases)){
89 89
                 $grid->addRow(new TableSeparator());
90 90
             }
91 91
         }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     private function renderTables(Table $grid, array $header, Database $database): void
121 121
     {
122
-        foreach ($database->getTables() as $table) {
122
+        foreach ($database->getTables() as $table){
123 123
             $grid->addRow(
124 124
                 array_merge(
125 125
                     $header,
Please login to merge, or discard this patch.
Braces   +20 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,13 +34,17 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function perform(DatabaseConfig $config, DatabaseManager $dbal): void
36 36
     {
37
-        if ($this->argument('db')) {
37
+        if ($this->argument('db'))
38
+        {
38 39
             $databases = [$this->argument('db')];
39
-        } else {
40
+        }
41
+        else
42
+        {
40 43
             $databases = array_keys($config->getDatabases());
41 44
         }
42 45
 
43
-        if (empty($databases)) {
46
+        if (empty($databases))
47
+        {
44 48
             $this->writeln('<fg=red>No databases found.</fg=red>');
45 49
 
46 50
             return;
@@ -58,7 +62,8 @@  discard block
 block discarded – undo
58 62
             ]
59 63
         );
60 64
 
61
-        foreach ($databases as $database) {
65
+        foreach ($databases as $database)
66
+        {
62 67
             $database = $dbal->database($database);
63 68
 
64 69
             /** @var Driver $driver */
@@ -71,12 +76,16 @@  discard block
 block discarded – undo
71 76
                 $database->getPrefix() ?: '<comment>---</comment>',
72 77
             ];
73 78
 
74
-            try {
79
+            try
80
+            {
75 81
                 $driver->connect();
76
-            } catch (\Exception $exception) {
82
+            }
83
+            catch (\Exception $exception)
84
+            {
77 85
                 $this->renderException($grid, $header, $exception);
78 86
 
79
-                if ($database->getName() != end($databases)) {
87
+                if ($database->getName() != end($databases))
88
+                {
80 89
                     $grid->addRow(new TableSeparator());
81 90
                 }
82 91
 
@@ -85,7 +94,8 @@  discard block
 block discarded – undo
85 94
 
86 95
             $header[] = '<info>connected</info>';
87 96
             $this->renderTables($grid, $header, $database);
88
-            if ($database->getName() != end($databases)) {
97
+            if ($database->getName() != end($databases))
98
+            {
89 99
                 $grid->addRow(new TableSeparator());
90 100
             }
91 101
         }
@@ -119,7 +129,8 @@  discard block
 block discarded – undo
119 129
      */
120 130
     private function renderTables(Table $grid, array $header, Database $database): void
121 131
     {
122
-        foreach ($database->getTables() as $table) {
132
+        foreach ($database->getTables() as $table)
133
+        {
123 134
             $grid->addRow(
124 135
                 array_merge(
125 136
                     $header,
Please login to merge, or discard this patch.