Passed
Push — master ( 91041f...4c697a )
by Kacper
03:30
created
Parser/TokenFactory.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     /**
32 32
      * TokenFactory constructor.
33 33
      *
34
-     * @param $class
34
+     * @param string $class
35 35
      */
36 36
     public function __construct($class, $type = 0x3) {
37 37
         $this->_class = $class;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
     public function create($params) {
42 42
         $params[0] = !empty($params[0]) ? $this->getName($params[0]) : $this->_base;
43
-        if(empty($params['rule'])) {
43
+        if (empty($params['rule'])) {
44 44
             $params['rule'] = $this->_rule;
45 45
         }
46 46
 
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *
5
- * Copyright (C) 2015, Some right reserved.
6
- *
7
- * @author Kacper "Kadet" Donat <[email protected]>
8
- *
9
- * Contact with author:
10
- * Xmpp: [email protected]
11
- * E-mail: [email protected]
12
- *
13
- * From Kadet with love.
14
- */
3
+     * Highlighter
4
+     *
5
+     * Copyright (C) 2015, Some right reserved.
6
+     *
7
+     * @author Kacper "Kadet" Donat <[email protected]>
8
+     *
9
+     * Contact with author:
10
+     * Xmpp: [email protected]
11
+     * E-mail: [email protected]
12
+     *
13
+     * From Kadet with love.
14
+     */
15 15
 
16 16
 namespace Kadet\Highlighter\Utils;
17 17
 
Please login to merge, or discard this patch.
Language/XmlLanguage.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *1
5
- * Copyright (C) 2015, Some right reserved.
6
- * @author Kacper "Kadet" Donat <[email protected]>
7
- *
8
- * Contact with author:
9
- * Xmpp: [email protected]
10
- * E-mail: [email protected]
11
- *
12
- * From Kadet with love.
13
- */
3
+     * Highlighter
4
+     *1
5
+     * Copyright (C) 2015, Some right reserved.
6
+     * @author Kacper "Kadet" Donat <[email protected]>
7
+     *
8
+     * Contact with author:
9
+     * Xmpp: [email protected]
10
+     * E-mail: [email protected]
11
+     *
12
+     * From Kadet with love.
13
+     */
14 14
 
15 15
 namespace Kadet\Highlighter\Language;
16 16
 
Please login to merge, or discard this patch.
Language/PhpLanguage.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *
5
- * Copyright (C) 2015, Some right reserved.
6
- * @author Kacper "Kadet" Donat <[email protected]>
7
- *
8
- * Contact with author:
9
- * Xmpp: [email protected]
10
- * E-mail: [email protected]
11
- *
12
- * From Kadet with love.
13
- */
3
+     * Highlighter
4
+     *
5
+     * Copyright (C) 2015, Some right reserved.
6
+     * @author Kacper "Kadet" Donat <[email protected]>
7
+     *
8
+     * Contact with author:
9
+     * Xmpp: [email protected]
10
+     * E-mail: [email protected]
11
+     *
12
+     * From Kadet with love.
13
+     */
14 14
 
15 15
 namespace Kadet\Highlighter\Language;
16 16
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
                 '__CLASS__', '__DIR__', '__FILE__', '__FUNCTION__',
82 82
                 '__LINE__', '__METHOD__', '__NAMESPACE__', '__TRAIT__',
83 83
             ], array_keys(get_defined_constants(true)["Core"]))), ['priority' => -2]),
84
-            'constant.static' => new Rule(new RegexMatcher('/(?:[\w\\\]+::|const\s+)(\w+)/i'), ['priority' => -2]   ),
84
+            'constant.static' => new Rule(new RegexMatcher('/(?:[\w\\\]+::|const\s+)(\w+)/i'), ['priority' => -2]),
85 85
 
86 86
             'keyword' => new Rule(new WordMatcher([
87 87
                 '__halt_compiler', 'abstract', 'and', 'array',
Please login to merge, or discard this patch.
Formatter/CliFormatter.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param $styles
34 34
      */
35 35
     public function __construct($styles = false) {
36
-        $this->_styles = $styles ?: include __DIR__.'/../Styles/Cli/Default.php';
36
+        $this->_styles = $styles ?: include __DIR__ . '/../Styles/Cli/Default.php';
37 37
     }
38 38
 
39 39
     public function format($source, \Traversable $tokens)
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
             $last = $token->pos;
53 53
         }
54
-        $result .= substr($source, $last).Console::reset();
54
+        $result .= substr($source, $last) . Console::reset();
55 55
 
56 56
         return $result;
57 57
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function getColor($token)
60 60
     {
61 61
         do {
62
-            if(isset($this->_styles[$token])) {
62
+            if (isset($this->_styles[$token])) {
63 63
                 return $this->_styles[$token];
64 64
             }
65 65
 
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *
5
- * Copyright (C) 2015, Some right reserved.
6
- *
7
- * @author Kacper "Kadet" Donat <[email protected]>
8
- *
9
- * Contact with author:
10
- * Xmpp: [email protected]
11
- * E-mail: [email protected]
12
- *
13
- * From Kadet with love.
14
- */
3
+     * Highlighter
4
+     *
5
+     * Copyright (C) 2015, Some right reserved.
6
+     *
7
+     * @author Kacper "Kadet" Donat <[email protected]>
8
+     *
9
+     * Contact with author:
10
+     * Xmpp: [email protected]
11
+     * E-mail: [email protected]
12
+     *
13
+     * From Kadet with love.
14
+     */
15 15
 
16 16
 namespace Kadet\Highlighter\Utils;
17 17
 
Please login to merge, or discard this patch.
Parser/Rule.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         reset($required);
129 129
         while (list($rule, $type) = each($required)) {
130 130
             $matched = !($type & self::CONTEXT_EXACTLY) ?
131
-                count(array_filter($context, function ($a) use ($rule) {
131
+                count(array_filter($context, function($a) use ($rule) {
132 132
                     return $a === $rule || fnmatch($rule . '.*', $a);
133 133
                 })) > 0 :
134 134
                 in_array($rule, $context, true);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     private function _unsetUnnecessaryRules($rule, &$required)
160 160
     {
161 161
         if (strpos($rule, '.') !== false) {
162
-            foreach (array_filter(array_keys($this->_context), function ($key) use ($rule) {
162
+            foreach (array_filter(array_keys($this->_context), function($key) use ($rule) {
163 163
                 return fnmatch($key . '.*', $rule);
164 164
             }) as $remove) {
165 165
                 unset($required[$remove]);
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *
5
- * Copyright (C) 2015, Some right reserved.
6
- *
7
- * @author Kacper "Kadet" Donat <[email protected]>
8
- *
9
- * Contact with author:
10
- * Xmpp: [email protected]
11
- * E-mail: [email protected]
12
- *
13
- * From Kadet with love.
14
- */
3
+     * Highlighter
4
+     *
5
+     * Copyright (C) 2015, Some right reserved.
6
+     *
7
+     * @author Kacper "Kadet" Donat <[email protected]>
8
+     *
9
+     * Contact with author:
10
+     * Xmpp: [email protected]
11
+     * E-mail: [email protected]
12
+     *
13
+     * From Kadet with love.
14
+     */
15 15
 
16 16
 namespace Kadet\Highlighter\Utils;
17 17
 
Please login to merge, or discard this patch.
Parser/CloseRule.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 {
21 21
     public function match($source)
22 22
     {
23
-        return array_filter(parent::match($source), function (Token $token) {
23
+        return array_filter(parent::match($source), function(Token $token) {
24 24
             if ($token->isEnd()) {
25 25
                 $token->setStart(null);
26 26
 
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *1
5
- * Copyright (C) 2015, Some right reserved.
6
- *
7
- * @author Kacper "Kadet" Donat <[email protected]>
8
- *
9
- * Contact with author:
10
- * Xmpp: [email protected]
11
- * E-mail: [email protected]
12
- *
13
- * From Kadet with love.
14
- */
3
+     * Highlighter
4
+     *1
5
+     * Copyright (C) 2015, Some right reserved.
6
+     *
7
+     * @author Kacper "Kadet" Donat <[email protected]>
8
+     *
9
+     * Contact with author:
10
+     * Xmpp: [email protected]
11
+     * E-mail: [email protected]
12
+     *
13
+     * From Kadet with love.
14
+     */
15 15
 
16 16
 namespace Kadet\Highlighter\Utils;
17 17
 
Please login to merge, or discard this patch.
Parser/MarkerToken.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
     protected function validate(Language $language, $context)
43 43
     {
44
-        if($language !== $this->getRule()->getLanguage()) {
44
+        if ($language !== $this->getRule()->getLanguage()) {
45 45
             return false;
46 46
         }
47 47
 
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *1
5
- * Copyright (C) 2015, Some right reserved.
6
- *
7
- * @author Kacper "Kadet" Donat <[email protected]>
8
- *
9
- * Contact with author:
10
- * Xmpp: [email protected]
11
- * E-mail: [email protected]
12
- *
13
- * From Kadet with love.
14
- */
3
+     * Highlighter
4
+     *1
5
+     * Copyright (C) 2015, Some right reserved.
6
+     *
7
+     * @author Kacper "Kadet" Donat <[email protected]>
8
+     *
9
+     * Contact with author:
10
+     * Xmpp: [email protected]
11
+     * E-mail: [email protected]
12
+     *
13
+     * From Kadet with love.
14
+     */
15 15
 
16 16
 namespace Kadet\Highlighter\Utils;
17 17
 
Please login to merge, or discard this patch.
Parser/LanguageToken.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
         $valid = false;
30 30
         if ($this->isStart()) {
31 31
             $lang = $this->_rule->getLanguage();
32
-            if($lang === null && $this->getLanguage() !== $language) {
32
+            if ($lang === null && $this->getLanguage() !== $language) {
33 33
                 $valid = true;
34
-            } elseif($language === $lang && $this->_rule->validateContext($context)) {
34
+            } elseif ($language === $lang && $this->_rule->validateContext($context)) {
35 35
                 $valid = true;
36 36
             }
37 37
         } else {
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *
5
- * Copyright (C) 2015, Some right reserved.
6
- *
7
- * @author Kacper "Kadet" Donat <[email protected]>
8
- *
9
- * Contact with author:
10
- * Xmpp: [email protected]
11
- * E-mail: [email protected]
12
- *
13
- * From Kadet with love.
14
- */
3
+     * Highlighter
4
+     *
5
+     * Copyright (C) 2015, Some right reserved.
6
+     *
7
+     * @author Kacper "Kadet" Donat <[email protected]>
8
+     *
9
+     * Contact with author:
10
+     * Xmpp: [email protected]
11
+     * E-mail: [email protected]
12
+     *
13
+     * From Kadet with love.
14
+     */
15 15
 
16 16
 namespace Kadet\Highlighter\Utils;
17 17
 
Please login to merge, or discard this patch.
Matcher/WordMatcher.php 2 patches
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.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *
5
- * Copyright (C) 2015, Some right reserved.
6
- *
7
- * @author Kacper "Kadet" Donat <[email protected]>
8
- *
9
- * Contact with author:
10
- * Xmpp: [email protected]
11
- * E-mail: [email protected]
12
- *
13
- * From Kadet with love.
14
- */
3
+     * Highlighter
4
+     *
5
+     * Copyright (C) 2015, Some right reserved.
6
+     *
7
+     * @author Kacper "Kadet" Donat <[email protected]>
8
+     *
9
+     * Contact with author:
10
+     * Xmpp: [email protected]
11
+     * E-mail: [email protected]
12
+     *
13
+     * From Kadet with love.
14
+     */
15 15
 
16 16
 namespace Kadet\Highlighter\Utils;
17 17
 
Please login to merge, or discard this patch.