@@ -69,7 +69,7 @@ |
||
69 | 69 | if ($this->isClass($definition)) { |
70 | 70 | $type = $definition; |
71 | 71 | } elseif ($this->isTypedArray($definition)) { |
72 | - $type = $definition[0] . '[]'; |
|
72 | + $type = $definition[0].'[]'; |
|
73 | 73 | } elseif (0 === strpos($definition, 'file:')) { |
74 | 74 | $type = UploadedFileInterface::class; |
75 | 75 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $documents[] = new ClassDefinition($className, $members); |
69 | 69 | } else { |
70 | 70 | $this->logger->warning("Schema for {$schema->getClass()} is not " |
71 | - . DocumentSchema::class . " instance"); |
|
71 | + . DocumentSchema::class." instance"); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | if (!is_array($definition)) { |
107 | 107 | $class = $definition; |
108 | 108 | } else { |
109 | - $class = $definition[0] . '[]'; |
|
109 | + $class = $definition[0].'[]'; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | $results[$name] = $class; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $class = $definition->getClass(); |
146 | 146 | break; |
147 | 147 | case DocumentEntity::MANY: |
148 | - $class = $definition->getClass() . '[]'; |
|
148 | + $class = $definition->getClass().'[]'; |
|
149 | 149 | break; |
150 | 150 | default: |
151 | 151 | throw new \RuntimeException('Unknown definition type: ' |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $type = str_replace('[]', '', $name); |
27 | 27 | |
28 | 28 | if (class_exists($type) || interface_exists($type) && '\\' !== $type[0]) { |
29 | - return '\\' . $name; |
|
29 | + return '\\'.$name; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | return $name; |
@@ -66,9 +66,9 @@ |
||
66 | 66 | public function write(array $classes) |
67 | 67 | { |
68 | 68 | foreach ($classes as $class) { |
69 | - $directory = $this->outputDirectory . $class->getNamespace(); |
|
69 | + $directory = $this->outputDirectory.$class->getNamespace(); |
|
70 | 70 | $directory = $this->files->normalizePath($directory); |
71 | - $filename = $directory . '/' . $class->getShortName() . '.php'; |
|
71 | + $filename = $directory.'/'.$class->getShortName().'.php'; |
|
72 | 72 | $filename = $this->files->normalizePath($filename); |
73 | 73 | |
74 | 74 | $this->files->ensureDirectory($directory); |
@@ -37,8 +37,8 @@ |
||
37 | 37 | public function publish(PublisherInterface $publisher, DirectoriesInterface $directories) |
38 | 38 | { |
39 | 39 | $publisher->publish( |
40 | - __DIR__ . '/../resources/config.php', |
|
41 | - $directories->directory('config') . IdeHelperConfig::CONFIG . '.php' |
|
40 | + __DIR__.'/../resources/config.php', |
|
41 | + $directories->directory('config').IdeHelperConfig::CONFIG.'.php' |
|
42 | 42 | ); |
43 | 43 | } |
44 | 44 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | 'locators' => [ |
15 | 15 | 'containers' => bind(Locators\ContainersLocator::class, [ |
16 | 16 | 'targets' => [ |
17 | - \Interop\Container\ContainerInterface::class . '::get', |
|
17 | + \Interop\Container\ContainerInterface::class.'::get', |
|
18 | 18 | 'spiral', |
19 | 19 | ], |
20 | 20 | ]), |
@@ -26,15 +26,15 @@ discard block |
||
26 | 26 | // writers are responsible for storing data collected by locators |
27 | 27 | 'writers' => [ |
28 | 28 | 'phpProperty' => bind(Writers\FilePerClassWriter::class, [ |
29 | - 'outputDirectory' => directory('application') . 'resources/ide-helper/', |
|
29 | + 'outputDirectory' => directory('application').'resources/ide-helper/', |
|
30 | 30 | 'renderer' => bind(Renderer\ReactorBasedPropertyRenderer::class), |
31 | 31 | ]), |
32 | 32 | 'phpDoc' => bind(Writers\FilePerClassWriter::class, [ |
33 | - 'outputDirectory' => directory('application') . 'resources/ide-helper/', |
|
33 | + 'outputDirectory' => directory('application').'resources/ide-helper/', |
|
34 | 34 | 'renderer' => bind(Renderer\ReactorBasedDocRenderer::class), |
35 | 35 | ]), |
36 | 36 | 'meta' => bind(Writers\SingleFileWriter::class, [ |
37 | - 'outputFile' => directory('root') . '.phpstorm.meta.php/virtual.meta.php', |
|
37 | + 'outputFile' => directory('root').'.phpstorm.meta.php/virtual.meta.php', |
|
38 | 38 | 'renderer' => bind(Renderer\PhpstormMetaRenderer::class), |
39 | 39 | ]), |
40 | 40 | ], |
@@ -38,24 +38,24 @@ |
||
38 | 38 | */ |
39 | 39 | public function render(array $classes): string |
40 | 40 | { |
41 | - $content = '<?php' . PHP_EOL; |
|
42 | - $content .= 'namespace PHPSTORM_META {' . PHP_EOL; |
|
41 | + $content = '<?php'.PHP_EOL; |
|
42 | + $content .= 'namespace PHPSTORM_META {'.PHP_EOL; |
|
43 | 43 | |
44 | 44 | foreach ($classes as $class) { |
45 | 45 | $target = $class->getName(); |
46 | - $content .= "override(\\{$target}(0), map([" . PHP_EOL; |
|
46 | + $content .= "override(\\{$target}(0), map([".PHP_EOL; |
|
47 | 47 | foreach ($class->getMembers() as $member) { |
48 | 48 | if ($member instanceof ClassProperty) { |
49 | 49 | $name = $member->getName(); |
50 | 50 | $type = Helpers::fqcn($member->getTypes()[0]); |
51 | 51 | |
52 | - $content .= "'{$name}' => {$type}::class," . PHP_EOL; |
|
52 | + $content .= "'{$name}' => {$type}::class,".PHP_EOL; |
|
53 | 53 | } |
54 | 54 | } |
55 | - $content .= "]));" . PHP_EOL; |
|
55 | + $content .= "]));".PHP_EOL; |
|
56 | 56 | } |
57 | 57 | |
58 | - $content .= "}" . PHP_EOL; |
|
58 | + $content .= "}".PHP_EOL; |
|
59 | 59 | |
60 | 60 | return $content; |
61 | 61 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | $records[] = new ClassDefinition($schema->getClass(), $members); |
72 | 72 | } else { |
73 | - $this->logger->warning("Schema for {$schema->getClass()} is not " . RecordSchema::class . " instance"); |
|
73 | + $this->logger->warning("Schema for {$schema->getClass()} is not ".RecordSchema::class." instance"); |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | $relationType = $definition->getType(); |
165 | 165 | if (in_array($relationType, [RecordEntity::MANY_TO_MANY, RecordEntity::HAS_MANY])) { |
166 | - $types[] = $definition->getTarget() . '[]'; |
|
166 | + $types[] = $definition->getTarget().'[]'; |
|
167 | 167 | } else { |
168 | 168 | $types[] = $definition->getTarget(); |
169 | 169 | } |