Passed
Push — master ( 5f8f14...173a37 )
by William
09:55
created
src/Utils/Tokens.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         // Flags.
59
-        return ! isset($pattern['flags'])
60
-            || (! (($pattern['flags'] & $token->flags) === 0));
59
+        return !isset($pattern['flags'])
60
+            || (!(($pattern['flags'] & $token->flags) === 0));
61 61
     }
62 62
 
63 63
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $isList = $list instanceof TokensList;
76 76
 
77 77
         // Parsing the tokens.
78
-        if (! $isList) {
78
+        if (!$isList) {
79 79
             $list = Lexer::getTokens($list);
80 80
         }
81 81
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                     ++$j;
136 136
                 }
137 137
 
138
-                if (! static::match($list->tokens[$j], $find[$k])) {
138
+                if (!static::match($list->tokens[$j], $find[$k])) {
139 139
                     // This token does not match the pattern.
140 140
                     break;
141 141
                 }
Please login to merge, or discard this patch.
src/Lexer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 use function strlen;
21 21
 use function substr;
22 22
 
23
-if (! defined('USE_UTF_STRINGS')) {
23
+if (!defined('USE_UTF_STRINGS')) {
24 24
     // NOTE: In previous versions of PHP (5.5 and older) the default
25 25
     // internal encoding is "ISO-8859-1".
26 26
     // All `mb_` functions must specify the correct encoding, which is
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         // For multi-byte strings, a new instance of `UtfString` is
177 177
         // initialized (only if `UtfString` usage is forced.
178
-        if (! $str instanceof UtfString && USE_UTF_STRINGS && $len !== mb_strlen($str, 'UTF-8')) {
178
+        if (!$str instanceof UtfString && USE_UTF_STRINGS && $len !== mb_strlen($str, 'UTF-8')) {
179 179
             $str = new UtfString($str);
180 180
         }
181 181
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         // Setting the delimiter.
188 188
         $this->setDelimiter(
189
-            ! empty($delimiter) ? $delimiter : static::$DEFAULT_DELIMITER
189
+            !empty($delimiter) ? $delimiter : static::$DEFAULT_DELIMITER
190 190
         );
191 191
 
192 192
         $this->lex();
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
                 $this->delimiter = null;
321 321
                 $delimiterLen = 0;
322 322
                 while (++$this->last < $this->len
323
-                    && ! Context::isWhitespace($this->str[$this->last])
323
+                    && !Context::isWhitespace($this->str[$this->last])
324 324
                     && $delimiterLen < 15
325 325
                 ) {
326 326
                     $this->delimiter .= $this->str[$this->last];
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
     {
567 567
         $token = $this->str[$this->last];
568 568
 
569
-        if (! Context::isWhitespace($token)) {
569
+        if (!Context::isWhitespace($token)) {
570 570
             return null;
571 571
         }
572 572
 
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
                 }
807 807
             } elseif ($state === 2) {
808 808
                 $flags |= Token::FLAG_NUMBER_HEX;
809
-                if (! (
809
+                if (!(
810 810
                         ($this->str[$this->last] >= '0' && $this->str[$this->last] <= '9')
811 811
                         || ($this->str[$this->last] >= 'A' && $this->str[$this->last] <= 'F')
812 812
                         || ($this->str[$this->last] >= 'a' && $this->str[$this->last] <= 'f')
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
         $token = $this->str[$this->last];
908 908
         $flags = Context::isString($token);
909 909
 
910
-        if (! $flags && $token !== $quote) {
910
+        if (!$flags && $token !== $quote) {
911 911
             return null;
912 912
         }
913 913
 
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
         $token = $this->str[$this->last];
959 959
         $flags = Context::isSymbol($token);
960 960
 
961
-        if (! $flags) {
961
+        if (!$flags) {
962 962
             return null;
963 963
         }
964 964
 
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
             return null;
1014 1014
         }
1015 1015
 
1016
-        while (++$this->last < $this->len && ! Context::isSeparator($this->str[$this->last])) {
1016
+        while (++$this->last < $this->len && !Context::isSeparator($this->str[$this->last])) {
1017 1017
             $token .= $this->str[$this->last];
1018 1018
 
1019 1019
             // Test if end of token equals the current delimiter. If so, remove it from the token.
Please login to merge, or discard this patch.