@@ -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 | } |
@@ -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 | }; |
@@ -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); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | public const NT_EXPRESSION = 0x09; |
20 | 20 | public const NT_COMMAND = 0x0A; |
21 | - public const NT_LOOP = 0x0B; |
|
21 | + public const NT_LOOP = 0x0B; |
|
22 | 22 | |
23 | - public const T_EOI = 0xFF; |
|
23 | + public const T_EOI = 0xFF; |
|
24 | 24 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | abstract class SymbolType |
6 | 6 | { |
7 | - public const NT_ROOT = 0x00; // Root symbol fot LL(1) parser |
|
7 | + public const NT_ROOT = 0x00; // Root symbol fot LL(1) parser |
|
8 | 8 | |
9 | 9 | public const T_PLUS = 0x01; // + |
10 | 10 | public const T_STAR = 0x02; // * |
@@ -30,19 +30,19 @@ |
||
30 | 30 | CharBufferInterface $buffer, |
31 | 31 | TokenFactoryInterface $tokenFactory |
32 | 32 | ): TokenMatcherContextInterface { |
33 | - $onConstruct = function (): void { |
|
33 | + $onConstruct = function(): void { |
|
34 | 34 | unset($this->token); |
35 | 35 | }; |
36 | - $onSetNewToken = function (int $tokenType) use ($tokenFactory): void { |
|
36 | + $onSetNewToken = function(int $tokenType) use ($tokenFactory): void { |
|
37 | 37 | $this->token = $tokenFactory->createToken($tokenType); |
38 | 38 | }; |
39 | - $onGetToken = function (): Token { |
|
39 | + $onGetToken = function(): Token { |
|
40 | 40 | return $this->getToken(); |
41 | 41 | }; |
42 | - $onSetMode = function (string $mode): void { |
|
42 | + $onSetMode = function(string $mode): void { |
|
43 | 43 | $this->mode = $mode; |
44 | 44 | }; |
45 | - $onGetMode = function (): string { |
|
45 | + $onGetMode = function(): string { |
|
46 | 46 | return $this->mode; |
47 | 47 | }; |
48 | 48 |
@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | EOF; |
106 | 106 | |
107 | - $declare = new Declare_([new DeclareDeclare('strict_types', $this->builder->val(1))]); |
|
107 | + $declare = new Declare_([new DeclareDeclare('strict_types', $this->builder->val(1))]); |
|
108 | 108 | $declare->setDocComment(new Doc($fileDocText)); |
109 | 109 | $nodes[] = $declare; |
110 | 110 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | 'Cc' => '/Properties/Cc.php', |
5 | 5 | 'Zs' => '/Properties/Zs.php', |
6 | 6 | 'Po' => '/Properties/Po.php', |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $output->writeln(' Parsing UnicodeData.txt...'); |
128 | 128 | $unicodeData = new SplFileObject($this->getSourceUnicodeData($input)); |
129 | 129 | $progressBar->setMaxSteps($unicodeData->getSize()); |
130 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
130 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
131 | 131 | $progressBar->advance($byteCount); |
132 | 132 | }; |
133 | 133 | $progressBar->start(); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $this->fetchRangeSets($output, $propertyBuilder, $progressBar); |
139 | 139 | |
140 | 140 | $progressIndicator->start('Building UnicodeData derivatives...'); |
141 | - $onBuildProgress = function () use ($progressIndicator) { |
|
141 | + $onBuildProgress = function() use ($progressIndicator) { |
|
142 | 142 | $progressIndicator->advance(); |
143 | 143 | }; |
144 | 144 | $propertyBuilder->buildUnicodeDataDerivatives($onBuildProgress); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $output->writeln(' Creating range sets from buffer...'); |
155 | 155 | $bufferSize = $propertyBuilder->getRangeBufferSize(); |
156 | 156 | $progressBar->setMaxSteps($bufferSize); |
157 | - $onFetchProgress = function (int $rangeSetIndex) use ($progressBar): void { |
|
157 | + $onFetchProgress = function(int $rangeSetIndex) use ($progressBar): void { |
|
158 | 158 | $progressBar->setProgress($rangeSetIndex); |
159 | 159 | }; |
160 | 160 | $progressBar->start(); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | $scripts = new SplFileObject($this->getSourceScripts($input)); |
230 | 230 | $progressBar->setMaxSteps($scripts->getSize()); |
231 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
231 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
232 | 232 | $progressBar->advance($byteCount); |
233 | 233 | }; |
234 | 234 | $progressBar->start(); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $this->fetchRangeSets($output, $propertyBuilder, $progressBar); |
240 | 240 | |
241 | 241 | $progressIndicator->start('Building Scripts derivatives...'); |
242 | - $onBuildProgress = function () use ($progressIndicator) { |
|
242 | + $onBuildProgress = function() use ($progressIndicator) { |
|
243 | 243 | $progressIndicator->advance(); |
244 | 244 | }; |
245 | 245 | $propertyBuilder->buildScriptsDerivatives($onBuildProgress); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $output->writeln(' Parsing PropList.txt...'); |
258 | 258 | $propList = new SplFileObject($this->getSourcePropList($input)); |
259 | 259 | $progressBar->setMaxSteps($propList->getSize()); |
260 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
260 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
261 | 261 | $progressBar->advance($byteCount); |
262 | 262 | }; |
263 | 263 | $progressBar->start(); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $output->writeln(' Parsing DerivedCoreProperties.txt...'); |
279 | 279 | $derivedCoreProperties = new SplFileObject($this->getSourceDerivedCoreProperties($input)); |
280 | 280 | $progressBar->setMaxSteps($derivedCoreProperties->getSize()); |
281 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
281 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
282 | 282 | $progressBar->advance($byteCount); |
283 | 283 | }; |
284 | 284 | $progressBar->start(); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | |
299 | 299 | $output->writeln(' Writing target files...'); |
300 | 300 | $progressBar->setMaxSteps($propertyBuilder->getFileCount()); |
301 | - $onWriteProgress = function () use ($progressBar): void { |
|
301 | + $onWriteProgress = function() use ($progressBar): void { |
|
302 | 302 | $progressBar->advance(); |
303 | 303 | }; |
304 | 304 | $progressBar->start(); |