@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return mixed |
39 | 39 | */ |
40 | - private static function mbCorrectMatchPositions( $haystack, &$matches) |
|
40 | + private static function mbCorrectMatchPositions($haystack, &$matches) |
|
41 | 41 | { |
42 | - if(!Strings::isMultibyte($haystack) ){ |
|
42 | + if (!Strings::isMultibyte($haystack)) { |
|
43 | 43 | return $matches[0]; |
44 | 44 | } |
45 | 45 | |
46 | - foreach ($matches[0] as $index => $match){ |
|
46 | + foreach ($matches[0] as $index => $match) { |
|
47 | 47 | $word = $match[0]; |
48 | 48 | $position = $match[1]; |
49 | 49 | |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @return int |
61 | 61 | */ |
62 | - private static function mbFindTheCorrectPosition( $haystack, $word, &$position) |
|
62 | + private static function mbFindTheCorrectPosition($haystack, $word, &$position) |
|
63 | 63 | { |
64 | 64 | $wordCheck = mb_substr($haystack, $position, mb_strlen($word)); |
65 | 65 | |
66 | - if($wordCheck !== $word){ |
|
66 | + if ($wordCheck !== $word) { |
|
67 | 67 | $position = $position - 1; |
68 | 68 | |
69 | 69 | self::mbFindTheCorrectPosition($haystack, $word, $position); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public static function htmlEntityDecode($string) |
23 | 23 | { |
24 | - return html_entity_decode($string, ENT_QUOTES|ENT_XHTML, 'UTF-8'); |
|
24 | + return html_entity_decode($string, ENT_QUOTES | ENT_XHTML, 'UTF-8'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -44,6 +44,6 @@ |
||
44 | 44 | */ |
45 | 45 | private static function getModifiedRegexPattern($pattern) |
46 | 46 | { |
47 | - return '/(\|\|\|\||<.*?>|%{.*?})(*SKIP)(*FAIL)|'. ltrim($pattern, $pattern[0]); |
|
47 | + return '/(\|\|\|\||<.*?>|%{.*?})(*SKIP)(*FAIL)|' . ltrim($pattern, $pattern[0]); |
|
48 | 48 | } |
49 | 49 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | private static function getFirstBounduaryPosition($splittedNeedle) |
40 | 40 | { |
41 | - for ($i=0; $i < count($splittedNeedle); $i++) { |
|
41 | + for ($i = 0; $i < count($splittedNeedle); $i++) { |
|
42 | 42 | if (self::isBoundary($splittedNeedle[$i])) { |
43 | 43 | return $i; |
44 | 44 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | private static function getLastBounduaryPosition($splittedNeedle) |
56 | 56 | { |
57 | - for ($i=(count($splittedNeedle)-1); $i >= 0; $i--) { |
|
57 | + for ($i = (count($splittedNeedle) - 1); $i >= 0; $i--) { |
|
58 | 58 | if (self::isBoundary($splittedNeedle[$i])) { |
59 | 59 | return $i; |
60 | 60 | } |