@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | 'Cc' => '/Ranges/Cc.php', |
5 | 5 | 'Zs' => '/Ranges/Zs.php', |
6 | 6 | 'Po' => '/Ranges/Po.php', |
@@ -40,7 +40,7 @@ |
||
40 | 40 | private function buildMessage(): string |
41 | 41 | { |
42 | 42 | $message = |
43 | - "Failed to load range set for Unicode property '{$this->propertyName}' " . |
|
43 | + "Failed to load range set for Unicode property '{$this->propertyName}' ". |
|
44 | 44 | "from file {$this->propertyFile}"; |
45 | 45 | |
46 | 46 | return isset($this->errorMessage) |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $fileNameType = gettype($this->propertyFile); |
42 | 42 | |
43 | 43 | return |
44 | - "Invalid config for Unicode property '{$this->propertyName}': " . |
|
44 | + "Invalid config for Unicode property '{$this->propertyName}': ". |
|
45 | 45 | "{$fileNameType} instead of string filename"; |
46 | 46 | } |
47 | 47 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $expectedType = RangeSetInterface::class; |
55 | 55 | |
56 | 56 | return |
57 | - "Invalid range set loaded from {$this->propertyFile} for Unicode property '{$this->propertyName}':\n" . |
|
57 | + "Invalid range set loaded from {$this->propertyFile} for Unicode property '{$this->propertyName}':\n". |
|
58 | 58 | "{$actualType} instead of {$expectedType}"; |
59 | 59 | } |
60 | 60 |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $fileIndex = []; |
200 | 200 | foreach ($this->rangeSets as $prop => $rangeSet) { |
201 | 201 | $baseName = "/Ranges/{$prop}.php"; |
202 | - $fileName = $targetRootDir . $baseName; |
|
202 | + $fileName = $targetRootDir.$baseName; |
|
203 | 203 | try { |
204 | 204 | $code = $this->buildPropertyFile($rangeSet); |
205 | 205 | \Safe\file_put_contents($fileName, $code); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $fileIndex[$prop] = $baseName; |
210 | 210 | $onProgress(); |
211 | 211 | } |
212 | - $fileName = $targetIndexRootDir . "/ranges.php"; |
|
212 | + $fileName = $targetIndexRootDir."/ranges.php"; |
|
213 | 213 | try { |
214 | 214 | $code = $this->buildIndexFile($fileIndex); |
215 | 215 | \Safe\file_put_contents($fileName, $code); |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $declare = new Declare_([new DeclareDeclare('strict_types', $this->phpBuilder->val(1))]); |
235 | 235 | $declare->setDocComment(new Doc('/** @noinspection PhpUnhandledExceptionInspection */')); |
236 | 236 | $phpNodes[] = $declare; |
237 | - $phpNodes[] = $this->phpBuilder->namespace(__NAMESPACE__ . '\\Properties')->getNode(); |
|
237 | + $phpNodes[] = $this->phpBuilder->namespace(__NAMESPACE__.'\\Properties')->getNode(); |
|
238 | 238 | $phpNodes[] = $this->phpBuilder->use($rangeSetClass->getName())->getNode(); |
239 | 239 | $phpRanges = []; |
240 | 240 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | private function getDefaultTargetRootPath(): string |
89 | 89 | { |
90 | 90 | return $this->getRealPath( |
91 | - __DIR__ . '/../../../src', |
|
91 | + __DIR__.'/../../../src', |
|
92 | 92 | 'Default target root path not detected' |
93 | 93 | ); |
94 | 94 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | private function getDefaultTargetIndexRootPath(): string |
97 | 97 | { |
98 | 98 | return $this->getRealPath( |
99 | - __DIR__ . '/../../../config', |
|
99 | + __DIR__.'/../../../config', |
|
100 | 100 | 'Default target index file root path not detected' |
101 | 101 | ); |
102 | 102 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | private function getDefaultSourceRootPath(): string |
114 | 114 | { |
115 | 115 | return $this->getRealPath( |
116 | - __DIR__ . '/../../data', |
|
116 | + __DIR__.'/../../data', |
|
117 | 117 | 'Default source root path not detected' |
118 | 118 | ); |
119 | 119 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $output->writeln(' Parsing UnicodeData.txt...'); |
143 | 143 | $unicodeData = new SplFileObject($this->getSourceUnicodeData($input)); |
144 | 144 | $progressBar->setMaxSteps($unicodeData->getSize()); |
145 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
145 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
146 | 146 | $progressBar->advance($byteCount); |
147 | 147 | }; |
148 | 148 | $progressBar->start(); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $this->fetchRangeSets($output, $propertyBuilder, $progressBar); |
154 | 154 | |
155 | 155 | $progressIndicator->start('Building UnicodeData derivatives...'); |
156 | - $onBuildProgress = function () use ($progressIndicator) { |
|
156 | + $onBuildProgress = function() use ($progressIndicator) { |
|
157 | 157 | $progressIndicator->advance(); |
158 | 158 | }; |
159 | 159 | $propertyBuilder->buildUnicodeDataDerivatives($onBuildProgress); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $output->writeln(' Creating range sets from buffer...'); |
170 | 170 | $bufferSize = $propertyBuilder->getRangeBufferSize(); |
171 | 171 | $progressBar->setMaxSteps($bufferSize); |
172 | - $onFetchProgress = function (int $rangeSetIndex) use ($progressBar): void { |
|
172 | + $onFetchProgress = function(int $rangeSetIndex) use ($progressBar): void { |
|
173 | 173 | $progressBar->setProgress($rangeSetIndex); |
174 | 174 | }; |
175 | 175 | $progressBar->start(); |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | { |
237 | 237 | $sourceScripts = $input->getOption($optionName); |
238 | 238 | if (is_string($sourceScripts)) { |
239 | - return $this->getSourceRootPath($input) . $sourceScripts; |
|
239 | + return $this->getSourceRootPath($input).$sourceScripts; |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | throw new RuntimeException("Option --{$optionName} must be a string"); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | |
255 | 255 | $scripts = new SplFileObject($this->getSourceScripts($input)); |
256 | 256 | $progressBar->setMaxSteps($scripts->getSize()); |
257 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
257 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
258 | 258 | $progressBar->advance($byteCount); |
259 | 259 | }; |
260 | 260 | $progressBar->start(); |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $this->fetchRangeSets($output, $propertyBuilder, $progressBar); |
266 | 266 | |
267 | 267 | $progressIndicator->start('Building Scripts derivatives...'); |
268 | - $onBuildProgress = function () use ($progressIndicator) { |
|
268 | + $onBuildProgress = function() use ($progressIndicator) { |
|
269 | 269 | $progressIndicator->advance(); |
270 | 270 | }; |
271 | 271 | $propertyBuilder->buildScriptsDerivatives($onBuildProgress); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $output->writeln(' Parsing PropList.txt...'); |
284 | 284 | $propList = new SplFileObject($this->getSourcePropList($input)); |
285 | 285 | $progressBar->setMaxSteps($propList->getSize()); |
286 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
286 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
287 | 287 | $progressBar->advance($byteCount); |
288 | 288 | }; |
289 | 289 | $progressBar->start(); |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | $output->writeln(' Parsing DerivedCoreProperties.txt...'); |
305 | 305 | $derivedCoreProperties = new SplFileObject($this->getSourceDerivedCoreProperties($input)); |
306 | 306 | $progressBar->setMaxSteps($derivedCoreProperties->getSize()); |
307 | - $onParseProgress = function (int $byteCount) use ($progressBar): void { |
|
307 | + $onParseProgress = function(int $byteCount) use ($progressBar): void { |
|
308 | 308 | $progressBar->advance($byteCount); |
309 | 309 | }; |
310 | 310 | $progressBar->start(); |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | |
325 | 325 | $output->writeln(' Writing target files...'); |
326 | 326 | $progressBar->setMaxSteps($propertyBuilder->getFileCount()); |
327 | - $onWriteProgress = function () use ($progressBar): void { |
|
327 | + $onWriteProgress = function() use ($progressBar): void { |
|
328 | 328 | $progressBar->advance(); |
329 | 329 | }; |
330 | 330 | $progressBar->start(); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use Remorhaz\UCD\Tool\Console\BuildPropertiesCommand; |
8 | 8 | use Symfony\Component\Console\Application; |
9 | 9 | |
10 | -require_once __DIR__ . '/../../vendor/autoload.php'; |
|
10 | +require_once __DIR__.'/../../vendor/autoload.php'; |
|
11 | 11 | |
12 | 12 | $app = new Application("PHP UCD: Unicode Property Builder"); |
13 | 13 | $buildCommand = new BuildPropertiesCommand(); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public static function create(): self |
33 | 33 | { |
34 | 34 | /** @psalm-var array<string, string> $index */ |
35 | - $index = require __DIR__ . '/../config/ranges.php'; |
|
35 | + $index = require __DIR__.'/../config/ranges.php'; |
|
36 | 36 | |
37 | 37 | return new self(__DIR__, $index); |
38 | 38 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if (!is_string($file)) { |
69 | 69 | throw new Exception\InvalidPropertyConfigException($propertyName, $file); |
70 | 70 | } |
71 | - $fileName = $this->path . $file; |
|
71 | + $fileName = $this->path.$file; |
|
72 | 72 | error_clear_last(); |
73 | 73 | /** |
74 | 74 | * @noinspection PhpIncludeInspection |