@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function assignTo(&$variable) |
| 38 | 38 | { |
| 39 | - $this->assignCallbacks[] = function ($text) use (&$variable) { |
|
| 39 | + $this->assignCallbacks[] = function($text) use (&$variable) { |
|
| 40 | 40 | $variable = $text; |
| 41 | 41 | }; |
| 42 | 42 | |
@@ -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) |