Passed
Push — master ( 54862f...3fe2ab )
by Kacper
02:54
created
Matcher/WordMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         ], $options);
35 35
 
36 36
         if ($options['escape']) {
37
-            $words = array_map(function ($word) {
37
+            $words = array_map(function($word) {
38 38
                 return preg_quote($word, '/');
39 39
             }, $words);
40 40
         }
Please login to merge, or discard this patch.
Matcher/CommentMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         $all = [];
53 53
 
54 54
         foreach ($this->multiLine as $name => $comment) {
55
-            $comment = array_map(function ($e) { return preg_quote($e, '/'); }, $comment);
55
+            $comment = array_map(function($e) { return preg_quote($e, '/'); }, $comment);
56 56
 
57 57
             $all[] = [$name, "/{$comment[0]}(.*?){$comment[1]}/ms"];
58 58
         }
Please login to merge, or discard this patch.
Utils/ArrayHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@
 block discarded – undo
45 45
 
46 46
     public static function rearrange(array $array, array $keys)
47 47
     {
48
-        return array_combine($keys, array_map(function ($key) use ($array) {
48
+        return array_combine($keys, array_map(function($key) use ($array) {
49 49
             return $array[$key];
50 50
         }, $keys));
51 51
     }
52 52
 
53 53
     public static function column(array $array, $index)
54 54
     {
55
-        return array_map(function ($e) use ($index) { return $e[$index]; }, $array);
55
+        return array_map(function($e) use ($index) { return $e[$index]; }, $array);
56 56
     }
57 57
 
58 58
     public static function find(array $array, callable $tester)
Please login to merge, or discard this patch.
Formatter/CliFormatter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param $styles
36 36
      */
37 37
     public function __construct($styles = false) {
38
-        $this->_styles = $styles ?: include __DIR__.'/../Styles/Cli/Default.php';
38
+        $this->_styles = $styles ?: include __DIR__ . '/../Styles/Cli/Default.php';
39 39
     }
40 40
 
41 41
     public function format(TokenIterator $tokens)
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
             $last = $token->pos;
57 57
         }
58
-        $result .= substr($source, $last).Console::reset();
58
+        $result .= substr($source, $last) . Console::reset();
59 59
 
60 60
         return $result;
61 61
     }
Please login to merge, or discard this patch.
Language/Sql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ITERATE', 'LANGUAGE', 'LARGE', 'LATERAL', 'LEADING',
41 41
         'LEAVE', 'LEFT', 'LIKE', 'LOCAL', 'LOOP', 'MATCH', 'MEMBER', 'MERGE', 'METHOD', 'MODIFIES',
42 42
         'MODULE', 'MONTH', 'MULTISET', 'NATIONAL', 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NO', 'NONE', 'NOT',
43
-        'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OR', 'ORDER', 'OUT','OUTER', 'OUTPUT', 'OVER',
43
+        'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTPUT', 'OVER',
44 44
         'OVERLAPS', 'PARAMETER', 'PARTITION', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURE', 'RANGE', 'READS',
45 45
         'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'RELEASE',
46 46
         'REPEAT', 'RESIGNAL', 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLLBACK', 'ROLLUP', 'ROW',
Please login to merge, or discard this patch.
Language/Html.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         $js = new JavaScriptLanguage();
29 29
 
30 30
         return array_merge(parent::getRules(), [
31
-            'language.'.$js->getIdentifier() => [
31
+            'language.' . $js->getIdentifier() => [
32 32
                 new OpenRule(new RegexMatcher('/<script.*?>()/'), [
33 33
                     'factory'     => new TokenFactory('Kadet\\Highlighter\\Parser\\LanguageToken'),
34 34
                     'inject'      => $js,
Please login to merge, or discard this patch.
Utils/ConsoleHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function styled($style, $text)
33 33
     {
34
-        return $this->open($style).$text.$this->close();
34
+        return $this->open($style) . $text . $this->close();
35 35
     }
36 36
 
37 37
     public function open($style)
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $this->_current = empty($this->_stack) ? $this->_default : array_pop($this->_stack);
52 52
 
53
-        return "\033[0m".$this->_set(array_diff($this->_current, $this->_default));
53
+        return "\033[0m" . $this->_set(array_diff($this->_current, $this->_default));
54 54
     }
55 55
 
56 56
     private function _color($name, $bg = false)
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 
103 103
     private function _set($style)
104 104
     {
105
-        $escape = "\e[".implode(';', array_map(function ($style, $name) {
105
+        $escape = "\e[" . implode(';', array_map(function($style, $name) {
106 106
             return $this->_style($style, $name);
107
-        }, array_keys($style), $style)).'m';
107
+        }, array_keys($style), $style)) . 'm';
108 108
 
109 109
         return $escape === "\e[m" ? null : $escape;
110 110
     }
Please login to merge, or discard this patch.
Parser/Rule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         reset($rules);
143 143
         while (list($rule, $type) = each($rules)) {
144 144
             $matched = !($type & self::CONTEXT_EXACTLY) ?
145
-                count(array_filter($context, function ($a) use ($rule) {
145
+                count(array_filter($context, function($a) use ($rule) {
146 146
                     return $a === $rule || fnmatch($rule . '.*', $a);
147 147
                 })) > 0 :
148 148
                 in_array($rule, $context, true);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     private function _unsetUnnecessaryRules($rule, &$required)
174 174
     {
175 175
         if (strpos($rule, '.') !== false) {
176
-            foreach (array_filter(array_keys($this->_context), function ($key) use ($rule) {
176
+            foreach (array_filter(array_keys($this->_context), function($key) use ($rule) {
177 177
                 return fnmatch($key . '.*', $rule);
178 178
             }) as $remove) {
179 179
                 unset($required[$remove]);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     {
196 196
         static $callable;
197 197
         if (!$callable) {
198
-            $callable = function () {
198
+            $callable = function() {
199 199
                 return true;
200 200
             };
201 201
         }
Please login to merge, or discard this patch.
Parser/Result.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
 
34 34
     public function append($value)
35 35
     {
36
-        if(!$value instanceof MetaToken) {
36
+        if (!$value instanceof MetaToken) {
37 37
             parent::append($value);
38 38
         }
39 39
     }
Please login to merge, or discard this patch.