Test Failed
Push — master ( 923481...f8ad64 )
by Gerrit
02:41
created
php-tests/unit/Lexing/SqlTokenizerClassTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
 
94 94
             if (file_exists($tokenFile)) {
95 95
                 $dataSets[basename($tokenFile)] = [
96
-                    (string)file_get_contents($sqlFile),
97
-                    trim((string)file_get_contents($tokenFile)),
96
+                    (string) file_get_contents($sqlFile),
97
+                    trim((string) file_get_contents($tokenFile)),
98 98
                 ];
99 99
             }
100 100
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     /** @param array<int, AbstractSqlToken> $tokens */
115 115
     private function tokenListToString(array $tokens): string
116 116
     {
117
-        return implode("\n", array_map(function (AbstractSqlToken $token) {
117
+        return implode("\n", array_map(function(AbstractSqlToken $token) {
118 118
             return $token->name();
119 119
         }, $tokens));
120 120
     }
Please login to merge, or discard this patch.
php/Lexing/SqlTokensClass.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function convertToSyntaxTree(): SqlAstRoot
43 43
     {
44 44
         /** @var array<SqlAstTokenNode> $tokenNodes */
45
-        $tokenNodes = array_map(function (SqlTokenInstance $token) {
45
+        $tokenNodes = array_map(function(SqlTokenInstance $token) {
46 46
             return new SqlAstTokenNode($token);
47 47
         }, $this->tokens);
48 48
 
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function withoutWhitespace(): SqlTokens
53 53
     {
54
-        return new self(array_filter($this->tokens, function (SqlTokenInstance $token) {
54
+        return new self(array_filter($this->tokens, function(SqlTokenInstance $token) {
55 55
             return !$token->is(SqlToken::SPACE());
56 56
         }), $this->originalSql);
57 57
     }
58 58
 
59 59
     public function withoutComments(): SqlTokens
60 60
     {
61
-        return new self(array_filter($this->tokens, function (SqlTokenInstance $token) {
61
+        return new self(array_filter($this->tokens, function(SqlTokenInstance $token) {
62 62
             return !$token->is(SqlToken::COMMENT());
63 63
         }), $this->originalSql);
64 64
     }
Please login to merge, or discard this patch.
php/Parsing/AbstractSyntaxTree/SqlAstBranch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public function hash(): string
43 43
     {
44 44
         /** @var array<string> $childHashes */
45
-        $childHashes = array_map(function (SqlAstNode $child) {
45
+        $childHashes = array_map(function(SqlAstNode $child) {
46 46
             return $child->hash();
47 47
         }, $this->children);
48 48
 
Please login to merge, or discard this patch.
php/Parsing/SqlParserClass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         SqlTokenizer $tokenizer,
34 34
         array $mutators
35 35
     ) {
36
-        array_map(function ($callback) {
36
+        array_map(function($callback) {
37 37
             /** @psalm-suppress RedundantConditionGivenDocblockType */
38 38
             Assert::isCallable($callback);
39 39
         }, $mutators);
Please login to merge, or discard this patch.
php/Parsing/AbstractSyntaxTree/SqlAstConjunction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@
 block discarded – undo
60 60
             if ($nextNode instanceof SqlAstTokenNode) {
61 61
                 /** @var bool $isConjunction */
62 62
                 $isConjunction = max(
63
-                    $nextNode->is(SqlToken::AND()),
64
-                    $nextNode->is(SqlToken::OR())
63
+                    $nextNode->is(SqlToken:: AND ()),
64
+                    $nextNode->is(SqlToken:: OR ())
65 65
                 );
66 66
 
67 67
                 if ($isConjunction) {
Please login to merge, or discard this patch.
php-tests/unit/Parsing/AbstractSyntaxTree/SqlAstBranchTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function shouldWalkChildren(): void
72 72
     {
73 73
         $mutatorAExpectedChilds = [$this->childA, $this->childB, $this->childC];
74
-        $mutatorA = function (SqlAstNode $child, int $offset, SqlAstMutableNode $subject) use (&$mutatorAExpectedChilds): void {
74
+        $mutatorA = function(SqlAstNode $child, int $offset, SqlAstMutableNode $subject) use (&$mutatorAExpectedChilds): void {
75 75
             $this->assertSame($this->subject, $subject);
76 76
             $this->assertNotEmpty($mutatorAExpectedChilds);
77 77
             $this->assertEquals(3 - count($mutatorAExpectedChilds), $offset);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         };
80 80
 
81 81
         $mutatorBExpectedChilds = [$this->childA, $this->childB, $this->childC];
82
-        $mutatorB = function (SqlAstNode $child, int $offset, SqlAstMutableNode $subject) use (&$mutatorBExpectedChilds): void {
82
+        $mutatorB = function(SqlAstNode $child, int $offset, SqlAstMutableNode $subject) use (&$mutatorBExpectedChilds): void {
83 83
             $this->assertSame($this->subject, $subject);
84 84
             $this->assertNotEmpty($mutatorBExpectedChilds);
85 85
             $this->assertEquals(3 - count($mutatorBExpectedChilds), $offset);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     {
104 104
         $this->subject->replace($offset, $length, $newNode);
105 105
 
106
-        $expectedChilds = array_map(function ($input) {
106
+        $expectedChilds = array_map(function($input) {
107 107
             if (is_string($input) && isset($this->{$input})) {
108 108
                 $input = $this->{$input};
109 109
             }
Please login to merge, or discard this patch.
php/Lexing/SqlTokenizerClass.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     /** @param array<string, AbstractSqlToken> $keywords */
23 23
     public function __construct(array $keywords)
24 24
     {
25
-        array_map(function ($keyword) {
25
+        array_map(function($keyword) {
26 26
             /** @psalm-suppress RedundantConditionGivenDocblockType */
27 27
             Assert::isInstanceOf($keyword, AbstractSqlToken::class);
28 28
         }, $keywords);
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
             'ON' => SqlToken::ON(),
106 106
             'IN' => SqlToken::IN(),
107 107
             'IS' => SqlToken::IS(),
108
-            'AND' => SqlToken::AND(),
108
+            'AND' => SqlToken:: AND (),
109 109
             'ORDER' => SqlToken::ORDER(),
110 110
             'BY' => SqlToken::BY(),
111 111
             'ASC' => SqlToken::ASC(),
112 112
             'DESC' => SqlToken::DESC(),
113
-            'OR' => SqlToken::OR(),
113
+            'OR' => SqlToken:: OR (),
114 114
             'LIKE' => SqlToken::LIKE(),
115 115
             'USING' => SqlToken::USING(),
116 116
             'WHERE' => SqlToken::WHERE(),
Please login to merge, or discard this patch.
php/Parsing/AbstractSyntaxTree/SqlAstOrderBy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
     public function hash(): string
107 107
     {
108 108
         /** @var array<string> $hashes */
109
-        $hashes = array_map(function (SqlAstNode $child) {
109
+        $hashes = array_map(function(SqlAstNode $child) {
110 110
             return $child->hash();
111 111
         }, $this->children());
112 112
 
Please login to merge, or discard this patch.