@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Generator; |
11 | 11 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Generator; |
11 | 11 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public function __construct(string $body, string $class) |
37 | 37 | { |
38 | 38 | $this->body = $body; |
39 | - $this->as($class . '.php'); |
|
39 | + $this->as($class.'.php'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function saveTo(string $directory): Readable |
67 | 67 | { |
68 | - $path = $directory . \DIRECTORY_SEPARATOR . $this->file; |
|
68 | + $path = $directory.\DIRECTORY_SEPARATOR.$this->file; |
|
69 | 69 | |
70 | - if (\is_file($path) && ! @\unlink($path)) { |
|
71 | - throw new NotReadableException('Could not save a new source into ' . $path); |
|
70 | + if (\is_file($path) && !@\unlink($path)) { |
|
71 | + throw new NotReadableException('Could not save a new source into '.$path); |
|
72 | 72 | } |
73 | 73 | |
74 | - if (! @\file_put_contents($path, $this->body)) { |
|
75 | - throw new NotReadableException('Could not save a new source into ' . $path); |
|
74 | + if (!@\file_put_contents($path, $this->body)) { |
|
75 | + throw new NotReadableException('Could not save a new source into '.$path); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return File::fromPathname($path); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Generator; |
11 | 11 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Generator\Renderer; |
11 | 11 | |
@@ -48,19 +48,19 @@ discard block |
||
48 | 48 | */ |
49 | 49 | private function bootFilters(): \Generator |
50 | 50 | { |
51 | - yield new TwigFilter('string', function (string $string): string { |
|
51 | + yield new TwigFilter('string', function(string $string): string { |
|
52 | 52 | $generator = new ValueGenerator($string, ValueGenerator::TYPE_STRING); |
53 | 53 | |
54 | 54 | return $generator->generate(); |
55 | 55 | }); |
56 | 56 | |
57 | - yield new TwigFilter('boolean', function (string $string): string { |
|
57 | + yield new TwigFilter('boolean', function(string $string): string { |
|
58 | 58 | $generator = new ValueGenerator($string, ValueGenerator::TYPE_BOOL); |
59 | 59 | |
60 | 60 | return $generator->generate(); |
61 | 61 | }); |
62 | 62 | |
63 | - yield new TwigFilter('array', function (array $items, int $depth = 0): string { |
|
63 | + yield new TwigFilter('array', function(array $items, int $depth = 0): string { |
|
64 | 64 | $generator = new ValueGenerator($items, ValueGenerator::TYPE_ARRAY_SHORT); |
65 | 65 | |
66 | 66 | $generator->setArrayDepth($depth); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | return $generator->generate(); |
69 | 69 | }); |
70 | 70 | |
71 | - yield new TwigFilter('class', function ($object): string { |
|
71 | + yield new TwigFilter('class', function($object): string { |
|
72 | 72 | if (\is_object($object)) { |
73 | 73 | return \get_class($object); |
74 | 74 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | return \json_encode($object); |
77 | 77 | }); |
78 | 78 | |
79 | - yield new TwigFilter('value', function ($value): string { |
|
79 | + yield new TwigFilter('value', function($value): string { |
|
80 | 80 | return (new ValueGenerator($value))->generate(); |
81 | 81 | }); |
82 | 82 | } |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Generator\Renderer; |
11 | 11 | |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | interface Renderer |
16 | 16 | { |
17 | - public const BASE_DIRECTORY = __DIR__ . '/../../../resources/templates'; |
|
17 | + public const BASE_DIRECTORY = __DIR__.'/../../../resources/templates'; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @param string $directory |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Generator; |
11 | 11 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler; |
11 | 11 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Lexer; |
11 | 11 |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * For the full copyright and license information, please view the LICENSE |
6 | 6 | * file that was distributed with this source code. |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace Railt\Compiler\Lexer; |
11 | 11 |