@@ -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 | } |
@@ -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) |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | { |
| 59 | 59 | /** @noinspection HtmlUnknownTag */ |
| 60 | 60 | return $this->parser |
| 61 | - ? (string)$this->parser |
|
| 61 | + ? (string) $this->parser |
|
| 62 | 62 | : '<undefined>'; |
| 63 | 63 | } |
| 64 | 64 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $this->last = $last === null |
| 32 | 32 | ? null |
| 33 | 33 | : self::parseCharacter($last); |
| 34 | - $this->in = (bool)$in; |
|
| 34 | + $this->in = (bool) $in; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | protected function parse(&$input, $offset, Context $context) |