@@ -52,7 +52,7 @@ |
||
| 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 | } |
@@ -1,17 +1,17 @@ |
||
| 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 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $needle = [$needle]; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - $results = array_map(function ($str) use ($haystack, $offset) { |
|
| 53 | + $results = array_map(function($str) use ($haystack, $offset) { |
|
| 54 | 54 | return [$str, strpos($haystack, $str, $offset)]; |
| 55 | 55 | }, $needle); |
| 56 | 56 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | $results = array_filter( |
| 62 | 62 | array_combine(ArrayHelper::column($results, 0), ArrayHelper::column($results, 1)), |
| 63 | - function ($a) { |
|
| 63 | + function($a) { |
|
| 64 | 64 | return $a !== false; |
| 65 | 65 | } |
| 66 | 66 | ); |
@@ -1,17 +1,17 @@ |
||
| 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 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | ]; |
| 32 | 32 | |
| 33 | 33 | public static function styled($style, $text) { |
| 34 | - return self::open($style).$text.self::close(); |
|
| 34 | + return self::open($style) . $text . self::close(); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public static function open($style) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | public static function close() |
| 49 | 49 | { |
| 50 | 50 | self::$_current = empty(self::$_stack) ? self::$_default : array_pop(self::$_stack); |
| 51 | - return "\033[0m".self::_set(array_diff(self::$_current, self::$_default)); |
|
| 51 | + return "\033[0m" . self::_set(array_diff(self::$_current, self::$_default)); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | private static function _color($name, $bg = false) |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | private static function _style($name, $value) { |
| 80 | - switch($name) { |
|
| 80 | + switch ($name) { |
|
| 81 | 81 | case 'color': |
| 82 | 82 | return self::_color($value); |
| 83 | 83 | case 'background': |
@@ -98,9 +98,9 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | private static function _set($style) { |
| 101 | - $escape = "\033[".implode(';', array_map(function($style, $name) { |
|
| 101 | + $escape = "\033[" . implode(';', array_map(function($style, $name) { |
|
| 102 | 102 | return self::_style($style, $name); |
| 103 | - }, array_keys($style), $style)).'m'; |
|
| 103 | + }, array_keys($style), $style)) . 'm'; |
|
| 104 | 104 | |
| 105 | 105 | return $escape; |
| 106 | 106 | } |
@@ -1,17 +1,17 @@ |
||
| 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 | |
@@ -45,14 +45,14 @@ |
||
| 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) |
@@ -1,17 +1,17 @@ |
||
| 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 | |
@@ -1,17 +1,17 @@ |
||
| 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 | |
@@ -1,17 +1,17 @@ |
||
| 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 | |
@@ -1,17 +1,17 @@ |
||
| 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 | |
@@ -1,17 +1,17 @@ |
||
| 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 | |