@@ -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 | |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | */ |
| 98 | 98 | protected static function getArguments($arguments, $arrayToSequence = true) |
| 99 | 99 | { |
| 100 | - return array_map(function ($argument) use ($arrayToSequence) { |
|
| 100 | + return array_map(function($argument) use ($arrayToSequence) { |
|
| 101 | 101 | return self::getArgument($argument, $arrayToSequence); |
| 102 | 102 | }, $arguments); |
| 103 | 103 | } |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | { |
| 124 | 124 | if (!empty($this->definition->processors)) { |
| 125 | 125 | $processors = $this->definition->processors; |
| 126 | - $match->addResultCallback(function (&$results) use ($processors, $localResults) { |
|
| 126 | + $match->addResultCallback(function(&$results) use ($processors, $localResults) { |
|
| 127 | 127 | foreach ($processors as $key => $processor) { |
| 128 | 128 | $results[$key] = $processor($localResults, $results); |
| 129 | 129 | } |
@@ -58,16 +58,16 @@ discard block |
||
| 58 | 58 | private function toString($depth = 0) |
| 59 | 59 | { |
| 60 | 60 | $signature = ($this->group |
| 61 | - ? $this->group.'::' |
|
| 61 | + ? $this->group . '::' |
|
| 62 | 62 | : '') |
| 63 | 63 | .($this->name |
| 64 | 64 | ? $this->name |
| 65 | 65 | : $this->class); |
| 66 | 66 | |
| 67 | - $output = str_repeat(' ', $depth)."{$signature} (`{$this->text}`)"; |
|
| 67 | + $output = str_repeat(' ', $depth) . "{$signature} (`{$this->text}`)"; |
|
| 68 | 68 | |
| 69 | 69 | foreach ($this->children as $child) { |
| 70 | - $output .= PHP_EOL.$child->toString($depth + 1); |
|
| 70 | + $output .= PHP_EOL . $child->toString($depth + 1); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | return $output; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $group = preg_replace('/[^-_a-zA-Z0-9]/', '_', $this->group); |
| 109 | 109 | |
| 110 | 110 | $element = $this->group |
| 111 | - ? $document->createElementNS($this->group, $group.':'.$name, $value) |
|
| 111 | + ? $document->createElementNS($this->group, $group . ':' . $name, $value) |
|
| 112 | 112 | : $document->createElement($name, $value); |
| 113 | 113 | |
| 114 | 114 | foreach ($this->children as $child) { |
@@ -48,6 +48,6 @@ |
||
| 48 | 48 | { |
| 49 | 49 | return ($this->sensitivity |
| 50 | 50 | ? 'case' |
| 51 | - : 'no-case').'( '.$this->parser.' )'; |
|
| 51 | + : 'no-case') . '( ' . $this->parser . ' )'; |
|
| 52 | 52 | } |
| 53 | 53 | } |
@@ -67,9 +67,9 @@ |
||
| 67 | 67 | case self::FIRST: |
| 68 | 68 | return (string) $this->parser; |
| 69 | 69 | case self::LONGEST: |
| 70 | - return 'longest-of'.(string) $this->parser; |
|
| 70 | + return 'longest-of' . (string) $this->parser; |
|
| 71 | 71 | case self::SHORTEST: |
| 72 | - return 'shortest-of'.(string) $this->parser; |
|
| 72 | + return 'shortest-of' . (string) $this->parser; |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -18,6 +18,6 @@ |
||
| 18 | 18 | |
| 19 | 19 | public function __toString() |
| 20 | 20 | { |
| 21 | - return 'Failed match at '.$this->length.' characters'; |
|
| 21 | + return 'Failed match at ' . $this->length . ' characters'; |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -87,6 +87,6 @@ |
||
| 87 | 87 | |
| 88 | 88 | public function __toString() |
| 89 | 89 | { |
| 90 | - return 'Successfully matched '.$this->length.' characters'; |
|
| 90 | + return 'Successfully matched ' . $this->length . ' characters'; |
|
| 91 | 91 | } |
| 92 | 92 | } |
@@ -98,6 +98,6 @@ |
||
| 98 | 98 | |
| 99 | 99 | return ($min === $max |
| 100 | 100 | ? $min |
| 101 | - : ($min.'*'.$max)).$this->parser; |
|
| 101 | + : ($min . '*' . $max)) . $this->parser; |
|
| 102 | 102 | } |
| 103 | 103 | } |