Completed
Branch 0.8-dev (8dbfb7)
by Kacper
06:35
created
Language/Php.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
- *
5
- * Copyright (C) 2016, 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) 2016, 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.
Utils/Helper.php 1 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) 2016, 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) 2016, 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\Matcher;
17 17
 
Please login to merge, or discard this patch.
Matcher/WholeMatcher.php 1 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) 2016, 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) 2016, 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\Matcher;
17 17
 
Please login to merge, or discard this patch.
Parser/OpenRule.php 1 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) 2016, 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) 2016, 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\Matcher;
17 17
 
Please login to merge, or discard this patch.
Parser/CloseRule.php 1 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) 2016, 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) 2016, 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\Matcher;
17 17
 
Please login to merge, or discard this patch.
Parser/Token/ContextualToken.php 2 patches
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) 2016, 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) 2016, 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\Matcher;
17 17
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
                 $this->_end->_valid = false;
44 44
             }
45 45
         } else {
46
-            if (!$this->rule->validator->validate($context, [ $this->name => Validator::CONTEXT_IN ])) {
46
+            if (!$this->rule->validator->validate($context, [$this->name => Validator::CONTEXT_IN])) {
47 47
                 $this->setValid(false);
48 48
             } else {
49 49
                 $this->_valid       = false;
Please login to merge, or discard this patch.
KeyLighter.php 2 patches
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) 2016, 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) 2016, 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\Language;
17 17
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@
 block discarded – undo
64 64
     }
65 65
 
66 66
     /**
67
-     * @param Language|callable|string $language
68
-     * @param array[string]            $aliases
67
+     * @param string $language
68
+     * @param string[]            $aliases
69 69
      */
70 70
     public function registerLanguage($language, $aliases)
71 71
     {
Please login to merge, or discard this patch.
Parser/Token/Token.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
     }
152 152
 
153 153
     /**
154
-     * @return Token|null|false
154
+     * @return Token
155 155
      */
156 156
     public function getEnd()
157 157
     {
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Highlighter
4
- *
5
- * Copyright (C) 2016, 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) 2016, 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\Parser\Token;
17 17
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         return $this->_end === null;
101 101
     }
102 102
 
103
-     public function isValid(Context $context)
103
+        public function isValid(Context $context)
104 104
     {
105 105
         if ($this->_valid === null) {
106 106
             $this->validate($context);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -178,13 +178,12 @@  discard block
 block discarded – undo
178 178
      * @return bool Return true to continue processing, false to return already processed tokens.
179 179
      */
180 180
     public function process(Context $context, Language $language, Result $result, TokenIterator $tokens) {
181
-        if(!$this->isValid($context)) {
181
+        if (!$this->isValid($context)) {
182 182
             return true;
183 183
         }
184 184
 
185 185
         return $this->isStart() ?
186
-            $this->processStart($context, $language, $result, $tokens) :
187
-            $this->processEnd($context, $language, $result, $tokens);
186
+            $this->processStart($context, $language, $result, $tokens) : $this->processEnd($context, $language, $result, $tokens);
188 187
     }
189 188
 
190 189
     protected function processStart(Context $context, Language $language, Result $result, TokenIterator $tokens) {
@@ -195,7 +194,7 @@  discard block
 block discarded – undo
195 194
     }
196 195
 
197 196
     protected function processEnd(Context $context, Language $language, Result $result, TokenIterator $tokens) {
198
-        if($this->_start) {
197
+        if ($this->_start) {
199 198
             $context->pop($this->_start);
200 199
         } else {
201 200
             if (($start = $context->find($this->name)) !== false) {
@@ -225,9 +224,9 @@  discard block
 block discarded – undo
225 224
                 return $multiplier;
226 225
             }
227 226
         } elseif (($rule = Helper::cmp($b->rule->priority, $a->rule->priority)) !== 0) {
228
-            return $multiplier*$rule;
229
-        }  else {
230
-            return $multiplier*($a->id < $b->id ? -1 : 1);
227
+            return $multiplier * $rule;
228
+        } else {
229
+            return $multiplier * ($a->id < $b->id ? -1 : 1);
231 230
         }
232 231
     }
233 232
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
             }
227 227
         } elseif (($rule = Helper::cmp($b->rule->priority, $a->rule->priority)) !== 0) {
228 228
             return $multiplier*$rule;
229
-        }  else {
229
+        } else {
230 230
             return $multiplier*($a->id < $b->id ? -1 : 1);
231 231
         }
232 232
     }
Please login to merge, or discard this patch.
Language/C.php 1 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) 2016, 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) 2016, 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\Language;
17 17
 
Please login to merge, or discard this patch.