@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $success = new Success($length, $successes); |
99 | 99 | |
100 | 100 | // ResultTrait |
101 | - $success->addResultCallback(function (&$results) use ($input, $offset, $length) { |
|
101 | + $success->addResultCallback(function(&$results) use ($input, $offset, $length) { |
|
102 | 102 | $text = substr($input, $offset, $length); |
103 | 103 | |
104 | 104 | $this->resolveResultCallbacks($results, $text); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | // AssignTrait |
108 | 108 | $callbacks = $this->callbacks; |
109 | - $success->addCustomCallback(function () use ($input, $offset, $length, $callbacks) { |
|
109 | + $success->addCustomCallback(function() use ($input, $offset, $length, $callbacks) { |
|
110 | 110 | $text = substr($input, $offset, $length); |
111 | 111 | |
112 | 112 | $this->resolveAssignCallbacks($text); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | }); |
118 | 118 | |
119 | 119 | // TokenTrait |
120 | - $success->setTokenCallback(function (&$children) use ($input, $offset, $length) { |
|
120 | + $success->setTokenCallback(function(&$children) use ($input, $offset, $length) { |
|
121 | 121 | return $this->resolveToken($input, $offset, $length, $children, get_class($this)); |
122 | 122 | }); |
123 | 123 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | if ($skip !== false) { |
63 | 63 | $match = $this->parser->parse($input, $offset + $length + $skip, $context); |
64 | 64 | if ($match instanceof Success) { |
65 | - $length += $skip + $match->length; |
|
65 | + $length += $skip + $match->length; |
|
66 | 66 | $child_matches[] = $match; |
67 | 67 | } |
68 | 68 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | public function __toString() |
58 | 58 | { |
59 | 59 | /** @noinspection HtmlUnknownTag */ |
60 | - return $this->parser ? (string)$this->parser : '<undefined>'; |
|
60 | + return $this->parser ? (string) $this->parser : '<undefined>'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | $this->first = $first === null ? null : self::parseCharacter($first); |
29 | 29 | $this->last = $last === null ? null : self::parseCharacter($last); |
30 | - $this->in = (bool)$in; |
|
30 | + $this->in = (bool) $in; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | protected function parse(&$input, $offset, Context $context) |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | public function __toString() |
52 | 52 | { |
53 | - return (string)$this->pattern; |
|
53 | + return (string) $this->pattern; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | $this->set = count_chars($set, 3); |
41 | - $this->include = (bool)$include; |
|
41 | + $this->include = (bool) $include; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | protected function parse(&$input, $offset, Context $context) |
@@ -53,7 +53,7 @@ |
||
53 | 53 | return $results; |
54 | 54 | case 'result': |
55 | 55 | $results = $this->getResults(); |
56 | - return isset($results[null]) ? $results[null] : null; |
|
56 | + return isset($results[null]) ? $results[null] : null; |
|
57 | 57 | case 'token': |
58 | 58 | return $this->getToken(); |
59 | 59 | } |