@@ -18,7 +18,7 @@ |
||
| 18 | 18 | ClassMetadataDefinition $definition, |
| 19 | 19 | ClassMetadataBuildingContext $metadataBuildingContext |
| 20 | 20 | ) : void { |
| 21 | - if (! file_exists($filePath)) { |
|
| 21 | + if ( ! file_exists($filePath)) { |
|
| 22 | 22 | parent::generate($filePath, $definition, $metadataBuildingContext); |
| 23 | 23 | |
| 24 | 24 | return; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | ?string $className = null, |
| 81 | 81 | ?string $embeddedClassName = null |
| 82 | 82 | ) : string { |
| 83 | - return $this->underscore($propertyName) . '_' . $embeddedColumnName; |
|
| 83 | + return $this->underscore($propertyName).'_'.$embeddedColumnName; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function joinColumnName(string $propertyName, ?string $className = null) : string |
| 98 | 98 | { |
| 99 | - return $this->underscore($propertyName) . '_' . $this->referenceColumnName(); |
|
| 99 | + return $this->underscore($propertyName).'_'.$this->referenceColumnName(); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function joinTableName(string $sourceEntity, string $targetEntity, ?string $propertyName = null) : string |
| 106 | 106 | { |
| 107 | - return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity); |
|
| 107 | + return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function joinKeyColumnName(string $entityName, ?string $referencedColumnName = null) : string |
| 114 | 114 | { |
| 115 | - return $this->classToTableName($entityName) . '_' . |
|
| 115 | + return $this->classToTableName($entityName).'_'. |
|
| 116 | 116 | ($referencedColumnName ?: $this->referenceColumnName()); |
| 117 | 117 | } |
| 118 | 118 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | ) : ClassMetadataDefinition { |
| 31 | 31 | $definition = $this->createDefinition($className, $parentMetadata); |
| 32 | 32 | |
| 33 | - if (! class_exists($definition->metadataClassName, false)) { |
|
| 33 | + if ( ! class_exists($definition->metadataClassName, false)) { |
|
| 34 | 34 | $metadataClassPath = $this->resolver->resolveMetadataClassPath($className); |
| 35 | 35 | |
| 36 | 36 | $this->generatorStrategy->generate($metadataClassPath, $definition, $metadataBuildingContext); |
@@ -143,8 +143,8 @@ discard block |
||
| 143 | 143 | ) : Mapping\ComponentMetadata { |
| 144 | 144 | $this->reverseEngineerMappingFromDatabase(); |
| 145 | 145 | |
| 146 | - if (! isset($this->classToTableNames[$className])) { |
|
| 147 | - throw new InvalidArgumentException('Unknown class ' . $className); |
|
| 146 | + if ( ! isset($this->classToTableNames[$className])) { |
|
| 147 | + throw new InvalidArgumentException('Unknown class '.$className); |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | $metadata = new Mapping\ClassMetadata($className, $parent, $metadataBuildingContext); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - if (! $otherFk) { |
|
| 176 | + if ( ! $otherFk) { |
|
| 177 | 177 | // the definition of this many to many table does not contain |
| 178 | 178 | // enough foreign key information to continue reverse engineering. |
| 179 | 179 | continue; |
@@ -256,9 +256,9 @@ discard block |
||
| 256 | 256 | $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns()); |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | - if (! $table->hasPrimaryKey()) { |
|
| 259 | + if ( ! $table->hasPrimaryKey()) { |
|
| 260 | 260 | throw new Mapping\MappingException( |
| 261 | - 'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' . |
|
| 261 | + 'Table '.$table->getName().' has no primary key. Doctrine does not '. |
|
| 262 | 262 | "support reverse engineering from tables that don't have a primary key." |
| 263 | 263 | ); |
| 264 | 264 | } |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | // Here we need to check if $fkColumns are the same as $primaryKeys |
| 451 | - if (! array_diff($fkColumns, $primaryKeys)) { |
|
| 451 | + if ( ! array_diff($fkColumns, $primaryKeys)) { |
|
| 452 | 452 | $metadata->addProperty($associationMapping); |
| 453 | 453 | } else { |
| 454 | 454 | $metadata->addProperty($associationMapping); |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | */ |
| 494 | 494 | private function getClassNameForTable($tableName) |
| 495 | 495 | { |
| 496 | - return $this->namespace . ( |
|
| 496 | + return $this->namespace.( |
|
| 497 | 497 | $this->classNamesForTables[$tableName] |
| 498 | 498 | ?? Inflector::classify(strtolower($tableName)) |
| 499 | 499 | ); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | public function joinColumnName(string $propertyName, ?string $className = null) : string |
| 19 | 19 | { |
| 20 | 20 | return strtolower($this->classToTableName($className)) |
| 21 | - . '_' . $propertyName |
|
| 22 | - . '_' . $this->referenceColumnName(); |
|
| 21 | + . '_'.$propertyName |
|
| 22 | + . '_'.$this->referenceColumnName(); |
|
| 23 | 23 | } |
| 24 | 24 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $driver = new DatabaseDriver($sm); |
| 62 | 62 | |
| 63 | 63 | foreach ($driver->getAllClassNames() as $className) { |
| 64 | - if (! in_array(strtolower($className), $classNames, true)) { |
|
| 64 | + if ( ! in_array(strtolower($className), $classNames, true)) { |
|
| 65 | 65 | continue; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | if (count($metadataList) !== count($classNames)) { |
| 74 | - $this->fail("Have not found all classes matching the names '" . implode(', ', $classNames) . "' only tables " . implode(', ', array_keys($metadataList))); |
|
| 74 | + $this->fail("Have not found all classes matching the names '".implode(', ', $classNames)."' only tables ".implode(', ', array_keys($metadataList))); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | return $metadataList; |
@@ -25,13 +25,13 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $config = new Configuration(); |
| 27 | 27 | |
| 28 | - $config->setProxyDir(__DIR__ . '/../Tests/Proxies'); |
|
| 28 | + $config->setProxyDir(__DIR__.'/../Tests/Proxies'); |
|
| 29 | 29 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
| 30 | 30 | $config->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_EVAL); |
| 31 | 31 | $config->setMetadataDriverImpl( |
| 32 | 32 | $config->newDefaultAnnotationDriver([ |
| 33 | - realpath(__DIR__ . '/Models/Cache'), |
|
| 34 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
| 33 | + realpath(__DIR__.'/Models/Cache'), |
|
| 34 | + realpath(__DIR__.'/Models/GeoNames'), |
|
| 35 | 35 | ]) |
| 36 | 36 | ); |
| 37 | 37 | |
@@ -53,15 +53,15 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | $config = new Configuration(); |
| 55 | 55 | |
| 56 | - $config->setProxyDir(__DIR__ . '/../Tests/Proxies'); |
|
| 56 | + $config->setProxyDir(__DIR__.'/../Tests/Proxies'); |
|
| 57 | 57 | $config->setProxyNamespace('Doctrine\Tests\Proxies'); |
| 58 | 58 | $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL); |
| 59 | 59 | $config->setMetadataDriverImpl( |
| 60 | 60 | $config->newDefaultAnnotationDriver( |
| 61 | 61 | [ |
| 62 | - realpath(__DIR__ . '/Models/Cache'), |
|
| 63 | - realpath(__DIR__ . '/Models/Generic'), |
|
| 64 | - realpath(__DIR__ . '/Models/GeoNames'), |
|
| 62 | + realpath(__DIR__.'/Models/Cache'), |
|
| 63 | + realpath(__DIR__.'/Models/Generic'), |
|
| 64 | + realpath(__DIR__.'/Models/GeoNames'), |
|
| 65 | 65 | ] |
| 66 | 66 | ) |
| 67 | 67 | ); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | protected function getReflectionService() : ReflectionService |
| 20 | 20 | { |
| 21 | - if (! $this->reflectionService) { |
|
| 21 | + if ( ! $this->reflectionService) { |
|
| 22 | 22 | $this->reflectionService = new StaticReflectionService(); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | protected function getReflectionService() : ReflectionService |
| 20 | 20 | { |
| 21 | - if (! $this->reflectionService) { |
|
| 21 | + if ( ! $this->reflectionService) { |
|
| 22 | 22 | $this->reflectionService = new RuntimeReflectionService(); |
| 23 | 23 | } |
| 24 | 24 | |