@@ -67,7 +67,7 @@ |
||
67 | 67 | |
68 | 68 | private function splitSymbolInTransitions(int $symbolId, int $symbolToAdd): void |
69 | 69 | { |
70 | - $addSymbol = function (array $symbolList) use ($symbolId, $symbolToAdd) { |
|
70 | + $addSymbol = function(array $symbolList) use ($symbolId, $symbolToAdd) { |
|
71 | 71 | if (in_array($symbolId, $symbolList)) { |
72 | 72 | $symbolList[] = $symbolToAdd; |
73 | 73 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | |
96 | 96 | private function setSortedRangeList(Range ...$rangeList): void |
97 | 97 | { |
98 | - $sortByFrom = function (Range $rangeOne, Range $rangeTwo): int { |
|
98 | + $sortByFrom = function(Range $rangeOne, Range $rangeTwo): int { |
|
99 | 99 | return $rangeOne->getStart() <=> $rangeTwo->getStart(); |
100 | 100 | }; |
101 | 101 | usort($rangeList, $sortByFrom); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | |
102 | 102 | public function replaceEachTransition(callable $callback): void |
103 | 103 | { |
104 | - $replaceCallback = function ($data, int $stateIn, int $stateOut) use ($callback) { |
|
104 | + $replaceCallback = function($data, int $stateIn, int $stateOut) use ($callback) { |
|
105 | 105 | $newData = call_user_func($callback, $data, $stateIn, $stateOut); |
106 | 106 | $this->replaceTransition($stateIn, $stateOut, $newData); |
107 | 107 | }; |
@@ -358,7 +358,7 @@ |
||
358 | 358 | |
359 | 359 | public function onFinish(): void |
360 | 360 | { |
361 | - $addTransitionToLanguage = function (RangeSet $rangeSet, int $stateIn, int $stateOut) { |
|
361 | + $addTransitionToLanguage = function(RangeSet $rangeSet, int $stateIn, int $stateOut) { |
|
362 | 362 | $this |
363 | 363 | ->getLanguageBuilder() |
364 | 364 | ->addTransition($stateIn, $stateOut, ...$rangeSet->getRanges()); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | private function checkMultipleEpsilons(int $symbolId, Production ...$productionList): void |
70 | 70 | { |
71 | - $isEpsilonProduction = function (Production $production): bool { |
|
71 | + $isEpsilonProduction = function(Production $production): bool { |
|
72 | 72 | return $production->isEpsilon(); |
73 | 73 | }; |
74 | 74 | $epsilonProductionList = array_filter($productionList, $isEpsilonProduction); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | private $tokenMap = []; |
11 | 11 | |
12 | - private $productionMap =[]; |
|
12 | + private $productionMap = []; |
|
13 | 13 | |
14 | 14 | private $rootSymbol; |
15 | 15 |
@@ -29,19 +29,19 @@ |
||
29 | 29 | CharBufferInterface $buffer, |
30 | 30 | TokenFactoryInterface $tokenFactory |
31 | 31 | ): TokenMatcherContextInterface { |
32 | - $onConstruct = function (): void { |
|
32 | + $onConstruct = function(): void { |
|
33 | 33 | unset($this->token); |
34 | 34 | }; |
35 | - $onSetNewToken = function (int $tokenType) use ($tokenFactory): void { |
|
35 | + $onSetNewToken = function(int $tokenType) use ($tokenFactory): void { |
|
36 | 36 | $this->token = $tokenFactory->createToken($tokenType); |
37 | 37 | }; |
38 | - $onGetToken = function (): Token { |
|
38 | + $onGetToken = function(): Token { |
|
39 | 39 | return $this->getToken(); |
40 | 40 | }; |
41 | - $onSetMode = function (string $mode): void { |
|
41 | + $onSetMode = function(string $mode): void { |
|
42 | 42 | $this->mode = $mode; |
43 | 43 | }; |
44 | - $onGetMode = function (): string { |
|
44 | + $onGetMode = function(): string { |
|
45 | 45 | return $this->mode; |
46 | 46 | }; |
47 | 47 | return new class( |
@@ -97,7 +97,7 @@ |
||
97 | 97 | $comment = "/**\n"; |
98 | 98 | $commentLineList = explode("\n", $content); |
99 | 99 | foreach ($commentLineList as $commentLine) { |
100 | - $comment .= rtrim(" * {$commentLine}") ."\n"; |
|
100 | + $comment .= rtrim(" * {$commentLine}") . "\n"; |
|
101 | 101 | } |
102 | 102 | $comment .= " */\n"; |
103 | 103 | return $comment; |
@@ -112,7 +112,7 @@ |
||
112 | 112 | { |
113 | 113 | if (!isset($this->targetNamespaceName)) { |
114 | 114 | [0 => $namespaceName] = $this->splitTargetClassName(); |
115 | - $this->targetNamespaceName =$namespaceName; |
|
115 | + $this->targetNamespaceName = $namespaceName; |
|
116 | 116 | } |
117 | 117 | return $this->targetNamespaceName; |
118 | 118 | } |