@@ -14,7 +14,6 @@ |
||
| 14 | 14 | use Railt\Io\Readable; |
| 15 | 15 | use Railt\Reflection\Contracts\Reflection; |
| 16 | 16 | use Railt\Reflection\Document; |
| 17 | -use Railt\SDL\Frontend\Context\LocalContext; |
|
| 18 | 17 | use Railt\SDL\Frontend\Record\RecordInterface; |
| 19 | 18 | |
| 20 | 19 | /** |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | public function generate(Readable $file, iterable $records): Document |
| 47 | 47 | { |
| 48 | 48 | foreach ($records as $record) { |
| 49 | - echo __FILE__ . ':' . __LINE__ . "\n"; |
|
| 49 | + echo __FILE__.':'.__LINE__."\n"; |
|
| 50 | 50 | echo \json_encode($record, \JSON_PRETTY_PRINT); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -14,14 +14,12 @@ |
||
| 14 | 14 | use Psr\Log\LoggerInterface; |
| 15 | 15 | use Railt\Io\File; |
| 16 | 16 | use Railt\Io\Readable; |
| 17 | -use Railt\Reflection\Contracts\Document as DocumentInterface; |
|
| 18 | 17 | use Railt\Reflection\Contracts\Document; |
| 19 | 18 | use Railt\Reflection\Reflection; |
| 20 | 19 | use Railt\SDL\Compiler\Dictionary; |
| 21 | 20 | use Railt\SDL\Compiler\Store; |
| 22 | 21 | use Railt\SDL\Exception\CompilerException; |
| 23 | 22 | use Railt\SDL\Exception\InternalException; |
| 24 | -use Railt\SDL\Frontend\Context\LocalContext; |
|
| 25 | 23 | use Railt\SDL\Frontend\Record\RecordInterface; |
| 26 | 24 | |
| 27 | 25 | /** |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function compile(Readable $file): DocumentInterface |
| 102 | 102 | { |
| 103 | - return $this->store->memoize($file, function (Readable $file): DocumentInterface { |
|
| 103 | + return $this->store->memoize($file, function(Readable $file): DocumentInterface { |
|
| 104 | 104 | return $this->generate($file, $this->ir($file)); |
| 105 | 105 | }); |
| 106 | 106 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | private function generate(Readable $readable, iterable $records): Document |
| 115 | 115 | { |
| 116 | - return $this->wrap(function () use ($readable, $records) { |
|
| 116 | + return $this->wrap(function() use ($readable, $records) { |
|
| 117 | 117 | return $this->back->run($readable, $records); |
| 118 | 118 | }); |
| 119 | 119 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | private function ir(Readable $readable): iterable |
| 127 | 127 | { |
| 128 | - return $this->wrap(function () use ($readable) { |
|
| 128 | + return $this->wrap(function() use ($readable) { |
|
| 129 | 129 | return $this->front->load($readable); |
| 130 | 130 | }); |
| 131 | 131 | } |
@@ -16,6 +16,6 @@ |
||
| 16 | 16 | { |
| 17 | 17 | protected function parse() |
| 18 | 18 | { |
| 19 | - throw new \LogicException(__METHOD__ . ' not implemented yet'); |
|
| 19 | + throw new \LogicException(__METHOD__.' not implemented yet'); |
|
| 20 | 20 | } |
| 21 | 21 | } |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | */ |
| 79 | 79 | private function bootInheritance(\SplStack $stack, array $children = []): void |
| 80 | 80 | { |
| 81 | - $push = function (string $type) use ($stack): void { |
|
| 81 | + $push = function(string $type) use ($stack): void { |
|
| 82 | 82 | self::$inheritance[$type] = \array_values(\iterator_to_array($stack)); |
| 83 | 83 | self::$inheritance[$type][] = static::ROOT_TYPE; |
| 84 | 84 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function match(RuleInterface $rule): bool |
| 43 | 43 | { |
| 44 | - return (bool)(self::TYPE_DEFINITIONS[$rule->getName()] ?? false); |
|
| 44 | + return (bool) (self::TYPE_DEFINITIONS[$rule->getName()] ?? false); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | return $inclusion; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - $pathname = \dirname($file->getPathname()) . \DIRECTORY_SEPARATOR . $inclusion; |
|
| 97 | + $pathname = \dirname($file->getPathname()).\DIRECTORY_SEPARATOR.$inclusion; |
|
| 98 | 98 | $pathname = \str_replace('/./', '/', $pathname); |
| 99 | 99 | |
| 100 | 100 | return $pathname; |