Passed
Push — master ( 95cec4...1545f9 )
by Kirill
03:38
created
src/AnnotatedRoutes/tests/App/runtime/cache/routes.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,38 +1,38 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return array (
3
+return array(
4 4
   'index' =>
5
-  array (
5
+  array(
6 6
     'pattern' => '/',
7 7
     'controller' => 'Spiral\\Tests\\Router\\App\\Controller\\HomeController',
8 8
     'action' => 'index',
9 9
     'group' => 'default',
10 10
     'verbs' =>
11
-    array (
11
+    array(
12 12
       0 => 'GET',
13 13
     ),
14 14
     'defaults' =>
15
-    array (
15
+    array(
16 16
     ),
17 17
     'middleware' =>
18
-    array (
18
+    array(
19 19
     ),
20 20
   ),
21 21
   'method' =>
22
-  array (
22
+  array(
23 23
     'pattern' => '/',
24 24
     'controller' => 'Spiral\\Tests\\Router\\App\\Controller\\HomeController',
25 25
     'action' => 'method',
26 26
     'group' => 'default',
27 27
     'verbs' =>
28
-    array (
28
+    array(
29 29
       0 => 'POST',
30 30
     ),
31 31
     'defaults' =>
32
-    array (
32
+    array(
33 33
     ),
34 34
     'middleware' =>
35
-    array (
35
+    array(
36 36
     ),
37 37
   ),
38 38
 );
Please login to merge, or discard this patch.
src/Exceptions/views/partials/stacktrace.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@  discard block
 block discarded – undo
10 10
 $vendorDir = dirname(dirname($vendorDir));
11 11
 $vendorID = null;
12 12
 $vendorCount = 0;
13
-foreach ($stacktrace as $index => $trace) {
13
+foreach ($stacktrace as $index => $trace){
14 14
     $args = [];
15
-    if (isset($trace['args'])) {
15
+    if (isset($trace['args'])){
16 16
         $args = $valueWrapper->wrap($trace['args']);
17 17
     }
18 18
 
19
-    $function = '<strong>' . $trace['function'] . '</strong>';
20
-    if (isset($trace['type']) && isset($trace['class'])) {
19
+    $function = '<strong>'.$trace['function'].'</strong>';
20
+    if (isset($trace['type']) && isset($trace['class'])){
21 21
         $reflection = new ReflectionClass($trace['class']);
22 22
         $function = sprintf(
23 23
             '<span title="%s">%s</span>%s%s',
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         );
29 29
     }
30 30
 
31
-    if (!isset($trace['file']) || !file_exists($trace['file'])) { ?>
31
+    if (!isset($trace['file']) || !file_exists($trace['file'])){ ?>
32 32
         <div class="container no-trace">
33 33
             <?= $function ?>(<span class="arguments"><?= implode(', ', $args) ?></span>)
34 34
         </div>
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
     }
38 38
 
39 39
     $isVendor = strpos($trace['file'], $vendorDir) === 0 && $index > 1;
40
-    if ($isVendor) {
41
-        if ($vendorID === null) {
40
+    if ($isVendor){
41
+        if ($vendorID === null){
42 42
             $vendorID = $index;
43 43
             $vendorCount++;
44 44
             echo sprintf('<span id="hidden-trace-%s" style="display: none;">', $vendorID);
45
-        } else {
45
+        }else{
46 46
             $vendorCount++;
47 47
         }
48
-    } elseif ($vendorID !== null) {
48
+    } elseif ($vendorID !== null){
49 49
         echo '</span>';
50 50
         echo sprintf(
51 51
             '<div id="%s" class="container" style="cursor: pointer;" onclick="toggle(\'%s\'); toggle(\'%s\');">&plus; %s vendor frame(s)...</div>',
52
-            'toggle-trace-' . $vendorID,
53
-            'toggle-trace-' . $vendorID,
54
-            'hidden-trace-' . $vendorID,
52
+            'toggle-trace-'.$vendorID,
53
+            'toggle-trace-'.$vendorID,
54
+            'hidden-trace-'.$vendorID,
55 55
             $vendorCount
56 56
         );
57 57
         $vendorID = null;
@@ -72,6 +72,6 @@  discard block
 block discarded – undo
72 72
     <?php
73 73
 }
74 74
 
75
-if ($vendorID !== null) {
75
+if ($vendorID !== null){
76 76
     echo '</span>';
77 77
 }
Please login to merge, or discard this patch.
src/Prototype/tests/Traverse/ConstructorParamsVisitor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,19 +24,19 @@
 block discarded – undo
24 24
      */
25 25
     public function leaveNode(Node $node): void
26 26
     {
27
-        if ($node instanceof Node\Stmt\ClassMethod && $node->name->name === '__construct') {
28
-            foreach ($node->params as $param) {
29
-                if ($param->type instanceof Node\NullableType) {
30
-                    if ($param->type->type instanceof Node\Identifier) {
27
+        if ($node instanceof Node\Stmt\ClassMethod && $node->name->name === '__construct'){
28
+            foreach ($node->params as $param){
29
+                if ($param->type instanceof Node\NullableType){
30
+                    if ($param->type->type instanceof Node\Identifier){
31 31
                         $type = $param->type->type->name;
32
-                    } else {
32
+                    }else{
33 33
                         $type = implode('\\', $param->type->type->parts);
34 34
                     }
35 35
 
36 36
                     $type = "?$type";
37
-                } elseif ($param->type instanceof Node\Name) {
37
+                } elseif ($param->type instanceof Node\Name){
38 38
                     $type = implode('\\', $param->type->parts);
39
-                } else {
39
+                }else{
40 40
                     $type = $param->type->name ?? null;
41 41
                 }
42 42
 
Please login to merge, or discard this patch.
src/Prototype/src/Annotation/Parser.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,22 +26,22 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $lines = explode("\n", $comment);
28 28
 
29
-        foreach ($lines as $line) {
29
+        foreach ($lines as $line){
30 30
             // strip up comment prefix
31 31
             $line = preg_replace('/[\t ]*[\/]?\*[\/]? ?/', '', $line);
32 32
 
33
-            if (preg_match('/ *@([^ ]+) (.*)/u', $line, $matches)) {
33
+            if (preg_match('/ *@([^ ]+) (.*)/u', $line, $matches)){
34 34
                 $this->lines[] = new Line($matches[2], $matches[1]);
35
-            } else {
35
+            }else{
36 36
                 $this->lines[] = new Line($line);
37 37
             }
38 38
         }
39 39
 
40
-        if (isset($this->lines[0]) && $this->lines[0]->isEmpty()) {
40
+        if (isset($this->lines[0]) && $this->lines[0]->isEmpty()){
41 41
             array_shift($this->lines);
42 42
         }
43 43
 
44
-        if (isset($this->lines[count($this->lines) - 1]) && $this->lines[count($this->lines) - 1]->isEmpty()) {
44
+        if (isset($this->lines[count($this->lines) - 1]) && $this->lines[count($this->lines) - 1]->isEmpty()){
45 45
             array_pop($this->lines);
46 46
         }
47 47
     }
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
         $result[] = '/**';
56 56
 
57 57
         // skip first and last tokens
58
-        foreach ($this->lines as $line) {
59
-            if ($line->type === null) {
58
+        foreach ($this->lines as $line){
59
+            if ($line->type === null){
60 60
                 $result[] = sprintf(' * %s', $line->value);
61 61
                 continue;
62 62
             }
Please login to merge, or discard this patch.
src/Prototype/src/NodeVisitors/ClassNode/LocateStatements.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function enterNode(Node $node)
30 30
     {
31
-        if ($node instanceof Node\Stmt\Use_) {
32
-            foreach ($node->uses as $use) {
31
+        if ($node instanceof Node\Stmt\Use_){
32
+            foreach ($node->uses as $use){
33 33
                 $this->imports[] = [
34 34
                     'name'  => implode('\\', $use->name->parts),
35 35
                     'alias' => !empty($use->alias) ? $use->alias->name : null,
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
             }
38 38
         }
39 39
 
40
-        if ($node instanceof Node\Stmt\Class_) {
41
-            foreach ($node->stmts as $stmt) {
42
-                if ($stmt instanceof Node\Stmt\ClassMethod && $stmt->name === '__construct') {
40
+        if ($node instanceof Node\Stmt\Class_){
41
+            foreach ($node->stmts as $stmt){
42
+                if ($stmt instanceof Node\Stmt\ClassMethod && $stmt->name === '__construct'){
43 43
                     return $stmt;
44 44
                 }
45 45
             }
Please login to merge, or discard this patch.
src/Prototype/src/NodeVisitors/ClassNode/DeclareClass.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
      */
27 27
     public function enterNode(Node $node)
28 28
     {
29
-        if ($node instanceof Node\Stmt\Namespace_) {
29
+        if ($node instanceof Node\Stmt\Namespace_){
30 30
             $this->namespace = implode('\\', $node->name->parts);
31 31
         }
32 32
 
33
-        if ($node instanceof Node\Stmt\Class_) {
33
+        if ($node instanceof Node\Stmt\Class_){
34 34
             $this->class = $node->name->name;
35 35
 
36 36
             return NodeTraverser::STOP_TRAVERSAL;
Please login to merge, or discard this patch.
src/Prototype/src/NodeVisitors/RemoveTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,26 +28,26 @@
 block discarded – undo
28 28
      */
29 29
     public function leaveNode(Node $node)
30 30
     {
31
-        if (!$node instanceof Node\Stmt\TraitUse) {
31
+        if (!$node instanceof Node\Stmt\TraitUse){
32 32
             return null;
33 33
         }
34 34
 
35
-        foreach ($node->traits as $index => $use) {
36
-            if ($use instanceof Node\Name) {
35
+        foreach ($node->traits as $index => $use){
36
+            if ($use instanceof Node\Name){
37 37
                 $name = $this->trimSlashes(implode('\\', $use->parts));
38 38
                 if (
39 39
                     in_array($name, [
40 40
                         $this->trimSlashes(PrototypeTrait::class),
41 41
                         Utils::shortName(PrototypeTrait::class),
42 42
                     ], true)
43
-                ) {
43
+                ){
44 44
                     unset($node->traits[$index]);
45 45
                 }
46 46
             }
47 47
         }
48 48
 
49 49
         $node->traits = array_values($node->traits);
50
-        if (empty($node->traits)) {
50
+        if (empty($node->traits)){
51 51
             return NodeTraverser::REMOVE_NODE;
52 52
         }
53 53
 
Please login to merge, or discard this patch.