@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Sequencing\Planning; |
| 6 | 6 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | public function executeImmediate(EntityManagerInterface $entityManager, /*object*/ $entity) : void |
| 26 | 26 | { |
| 27 | - if (! $this->executor->isDeferred()) { |
|
| 27 | + if ( ! $this->executor->isDeferred()) { |
|
| 28 | 28 | $this->dispatchExecutor($entity, $entityManager); |
| 29 | 29 | } |
| 30 | 30 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Sequencing\Planning; |
| 6 | 6 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public function executeDeferred(EntityManagerInterface $entityManager, /*object*/ $entity) : void |
| 40 | 40 | { |
| 41 | 41 | foreach ($this->executors as $executor) { |
| 42 | - if (! $executor->isDeferred()) { |
|
| 42 | + if ( ! $executor->isDeferred()) { |
|
| 43 | 43 | continue; |
| 44 | 44 | } |
| 45 | 45 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Sequencing; |
| 6 | 6 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $this->allocationSize |
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | - if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) { |
|
| 76 | + if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) { |
|
| 77 | 77 | // no affected rows, concurrency issue, throw exception |
| 78 | 78 | } |
| 79 | 79 | } else { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Tools; |
| 6 | 6 | |
@@ -58,28 +58,28 @@ discard block |
||
| 58 | 58 | $fh = fopen($this->file, 'xb+'); |
| 59 | 59 | |
| 60 | 60 | if (count($identityMap) === 0) { |
| 61 | - fwrite($fh, 'Flush Operation [' . $this->context . "] - Empty identity map.\n"); |
|
| 61 | + fwrite($fh, 'Flush Operation ['.$this->context."] - Empty identity map.\n"); |
|
| 62 | 62 | |
| 63 | 63 | return; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - fwrite($fh, 'Flush Operation [' . $this->context . "] - Dumping identity map:\n"); |
|
| 66 | + fwrite($fh, 'Flush Operation ['.$this->context."] - Dumping identity map:\n"); |
|
| 67 | 67 | |
| 68 | 68 | foreach ($identityMap as $className => $map) { |
| 69 | - fwrite($fh, 'Class: ' . $className . "\n"); |
|
| 69 | + fwrite($fh, 'Class: '.$className."\n"); |
|
| 70 | 70 | |
| 71 | 71 | foreach ($map as $entity) { |
| 72 | - fwrite($fh, ' Entity: ' . $this->getIdString($entity, $uow) . ' ' . spl_object_id($entity) . "\n"); |
|
| 72 | + fwrite($fh, ' Entity: '.$this->getIdString($entity, $uow).' '.spl_object_id($entity)."\n"); |
|
| 73 | 73 | fwrite($fh, " Associations:\n"); |
| 74 | 74 | |
| 75 | 75 | $cm = $em->getClassMetadata($className); |
| 76 | 76 | |
| 77 | 77 | foreach ($cm->getDeclaredPropertiesIterator() as $field => $association) { |
| 78 | - if (! ($association instanceof AssociationMetadata)) { |
|
| 78 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
| 79 | 79 | continue; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - fwrite($fh, ' ' . $field . ' '); |
|
| 82 | + fwrite($fh, ' '.$field.' '); |
|
| 83 | 83 | |
| 84 | 84 | $value = $association->getValue($entity); |
| 85 | 85 | |
@@ -94,21 +94,21 @@ discard block |
||
| 94 | 94 | fwrite($fh, '[PROXY] '); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - fwrite($fh, $this->getIdString($value, $uow) . ' ' . spl_object_id($value) . "\n"); |
|
| 97 | + fwrite($fh, $this->getIdString($value, $uow).' '.spl_object_id($value)."\n"); |
|
| 98 | 98 | } else { |
| 99 | 99 | $initialized = ! ($value instanceof PersistentCollection) || $value->isInitialized(); |
| 100 | 100 | |
| 101 | 101 | if ($initialized) { |
| 102 | - fwrite($fh, '[INITIALIZED] ' . $this->getType($value) . ' ' . count($value) . " elements\n"); |
|
| 102 | + fwrite($fh, '[INITIALIZED] '.$this->getType($value).' '.count($value)." elements\n"); |
|
| 103 | 103 | |
| 104 | 104 | foreach ($value as $obj) { |
| 105 | - fwrite($fh, ' ' . $this->getIdString($obj, $uow) . ' ' . spl_object_id($obj) . "\n"); |
|
| 105 | + fwrite($fh, ' '.$this->getIdString($obj, $uow).' '.spl_object_id($obj)."\n"); |
|
| 106 | 106 | } |
| 107 | 107 | } else { |
| 108 | - fwrite($fh, '[PROXY] ' . $this->getType($value) . " unknown element size\n"); |
|
| 108 | + fwrite($fh, '[PROXY] '.$this->getType($value)." unknown element size\n"); |
|
| 109 | 109 | |
| 110 | 110 | foreach ($value->unwrap() as $obj) { |
| 111 | - fwrite($fh, ' ' . $this->getIdString($obj, $uow) . ' ' . spl_object_id($obj) . "\n"); |
|
| 111 | + fwrite($fh, ' '.$this->getIdString($obj, $uow).' '.spl_object_id($obj)."\n"); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $idstring = ''; |
| 148 | 148 | |
| 149 | 149 | foreach ($ids as $k => $v) { |
| 150 | - $idstring .= $k . '=' . $v; |
|
| 150 | + $idstring .= $k.'='.$v; |
|
| 151 | 151 | } |
| 152 | 152 | } else { |
| 153 | 153 | $idstring = 'NEWOBJECT '; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Tools; |
| 6 | 6 | |
@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | public static function registerAutoloadDirectory($directory) |
| 29 | 29 | { |
| 30 | - if (! class_exists('Doctrine\Common\ClassLoader', false)) { |
|
| 31 | - require_once $directory . '/Doctrine/Common/ClassLoader.php'; |
|
| 30 | + if ( ! class_exists('Doctrine\Common\ClassLoader', false)) { |
|
| 31 | + require_once $directory.'/Doctrine/Common/ClassLoader.php'; |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $loader = new ClassLoader('Doctrine', $directory); |
| 35 | 35 | $loader->register(); |
| 36 | 36 | |
| 37 | - $loader = new ClassLoader('Symfony\Component', $directory . '/Doctrine'); |
|
| 37 | + $loader = new ClassLoader('Symfony\Component', $directory.'/Doctrine'); |
|
| 38 | 38 | $loader->register(); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | { |
| 102 | 102 | $cache = self::createCacheInstance($isDevMode, $cache); |
| 103 | 103 | |
| 104 | - if (! $cache instanceof CacheProvider) { |
|
| 104 | + if ( ! $cache instanceof CacheProvider) { |
|
| 105 | 105 | return $cache; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $namespace .= ':'; |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - $cache->setNamespace($namespace . 'dc2_' . md5($proxyDir) . '_'); // to avoid collisions |
|
| 114 | + $cache->setNamespace($namespace.'dc2_'.md5($proxyDir).'_'); // to avoid collisions |
|
| 115 | 115 | |
| 116 | 116 | return $cache; |
| 117 | 117 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Tools; |
| 6 | 6 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $ce = []; |
| 71 | 71 | |
| 72 | 72 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $association) { |
| 73 | - if (! ($association instanceof AssociationMetadata)) { |
|
| 73 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
| 74 | 74 | continue; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | foreach ($class->getSubClasses() as $subClass) { |
| 81 | - if (! in_array($class->getClassName(), class_parents($subClass))) { |
|
| 81 | + if ( ! in_array($class->getClassName(), class_parents($subClass))) { |
|
| 82 | 82 | $message = "According to the discriminator map class, '%s' has to be a child of '%s', but these entities are not related through inheritance."; |
| 83 | 83 | |
| 84 | 84 | $ce[] = sprintf($message, $subClass, $class->getClassName()); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $fieldName = $association->getName(); |
| 98 | 98 | $targetEntity = $association->getTargetEntity(); |
| 99 | 99 | |
| 100 | - if (! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
| 100 | + if ( ! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
| 101 | 101 | $message = "The target entity '%s' specified on %s#%s is unknown or not an entity."; |
| 102 | 102 | |
| 103 | 103 | return [sprintf($message, $targetEntity, $class->getClassName(), $fieldName)]; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | /** @var ClassMetadata $targetMetadata */ |
| 118 | 118 | $targetMetadata = $metadataFactory->getMetadataFor($targetEntity); |
| 119 | - $containsForeignId = array_filter($targetMetadata->identifier, function ($identifier) use ($targetMetadata) { |
|
| 119 | + $containsForeignId = array_filter($targetMetadata->identifier, function($identifier) use ($targetMetadata) { |
|
| 120 | 120 | $targetProperty = $targetMetadata->getProperty($identifier); |
| 121 | 121 | |
| 122 | 122 | return $targetProperty instanceof AssociationMetadata; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | /** @var AssociationMetadata $targetAssociation */ |
| 133 | 133 | $targetAssociation = $targetMetadata->getProperty($mappedBy); |
| 134 | 134 | |
| 135 | - if (! $targetAssociation) { |
|
| 135 | + if ( ! $targetAssociation) { |
|
| 136 | 136 | $message = 'The association %s#%s refers to the owning side property %s#%s which does not exist.'; |
| 137 | 137 | |
| 138 | 138 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | /** @var AssociationMetadata $targetAssociation */ |
| 157 | 157 | $targetAssociation = $targetMetadata->getProperty($inversedBy); |
| 158 | 158 | |
| 159 | - if (! $targetAssociation) { |
|
| 159 | + if ( ! $targetAssociation) { |
|
| 160 | 160 | $message = 'The association %s#%s refers to the inverse side property %s#%s which does not exist.'; |
| 161 | 161 | |
| 162 | 162 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $joinTable = $association->getJoinTable(); |
| 201 | 201 | |
| 202 | 202 | foreach ($joinTable->getJoinColumns() as $joinColumn) { |
| 203 | - if (! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns)) { |
|
| 203 | + if ( ! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns)) { |
|
| 204 | 204 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
| 205 | 205 | |
| 206 | 206 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $class->getClassName()); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) { |
| 212 | - if (! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns)) { |
|
| 212 | + if ( ! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns)) { |
|
| 213 | 213 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
| 214 | 214 | |
| 215 | 215 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | if (count($targetIdentifierColumns) !== count($joinTable->getInverseJoinColumns())) { |
| 221 | 221 | $columnNames = array_map( |
| 222 | - function (JoinColumnMetadata $joinColumn) { |
|
| 222 | + function(JoinColumnMetadata $joinColumn) { |
|
| 223 | 223 | return $joinColumn->getReferencedColumnName(); |
| 224 | 224 | }, |
| 225 | 225 | $joinTable->getInverseJoinColumns() |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | if (count($classIdentifierColumns) !== count($joinTable->getJoinColumns())) { |
| 236 | 236 | $columnNames = array_map( |
| 237 | - function (JoinColumnMetadata $joinColumn) { |
|
| 237 | + function(JoinColumnMetadata $joinColumn) { |
|
| 238 | 238 | return $joinColumn->getReferencedColumnName(); |
| 239 | 239 | }, |
| 240 | 240 | $joinTable->getJoinColumns() |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $joinColumns = $association->getJoinColumns(); |
| 252 | 252 | |
| 253 | 253 | foreach ($joinColumns as $joinColumn) { |
| 254 | - if (! in_array($joinColumn->getReferencedColumnName(), $identifierColumns)) { |
|
| 254 | + if ( ! in_array($joinColumn->getReferencedColumnName(), $identifierColumns)) { |
|
| 255 | 255 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
| 256 | 256 | |
| 257 | 257 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | continue; |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | - if (! ($targetProperty instanceof AssociationMetadata)) { |
|
| 285 | + if ( ! ($targetProperty instanceof AssociationMetadata)) { |
|
| 286 | 286 | $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'."; |
| 287 | 287 | |
| 288 | 288 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $orderField, $targetMetadata->getClassName()); |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Tools; |
| 6 | 6 | |
@@ -168,11 +168,11 @@ discard block |
||
| 168 | 168 | $pkColumns = []; |
| 169 | 169 | |
| 170 | 170 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
| 171 | - if (! ($property instanceof FieldMetadata)) { |
|
| 171 | + if ( ! ($property instanceof FieldMetadata)) { |
|
| 172 | 172 | continue; |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | - if (! $class->isInheritedProperty($fieldName)) { |
|
| 175 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
| 176 | 176 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
| 177 | 177 | |
| 178 | 178 | $this->gatherColumn($class, $property, $table); |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - if (! empty($inheritedKeyColumns)) { |
|
| 210 | + if ( ! empty($inheritedKeyColumns)) { |
|
| 211 | 211 | // Add a FK constraint on the ID column |
| 212 | 212 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
| 213 | 213 | |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - if (! $table->hasIndex('primary')) { |
|
| 255 | + if ( ! $table->hasIndex('primary')) { |
|
| 256 | 256 | $table->setPrimaryKey($pkColumns); |
| 257 | 257 | } |
| 258 | 258 | |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | $processedClasses[$class->getClassName()] = true; |
| 313 | 313 | |
| 314 | 314 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
| 315 | - if (! $property instanceof FieldMetadata |
|
| 315 | + if ( ! $property instanceof FieldMetadata |
|
| 316 | 316 | || ! $property->hasValueGenerator() |
| 317 | 317 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
| 318 | 318 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | |
| 322 | 322 | $quotedName = $this->platform->quoteIdentifier($property->getValueGenerator()->getDefinition()['sequenceName']); |
| 323 | 323 | |
| 324 | - if (! $schema->hasSequence($quotedName)) { |
|
| 324 | + if ( ! $schema->hasSequence($quotedName)) { |
|
| 325 | 325 | $schema->createSequence($quotedName, $property->getValueGenerator()->getDefinition()['allocationSize']); |
| 326 | 326 | } |
| 327 | 327 | } |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | |
| 337 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
| 337 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
| 338 | 338 | $schema->visit(new RemoveNamespacedAssets()); |
| 339 | 339 | } |
| 340 | 340 | |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | break; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
| 376 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
| 377 | 377 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
| 378 | 378 | } |
| 379 | 379 | |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | $pkColumns = []; |
| 392 | 392 | |
| 393 | 393 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
| 394 | - if (! ($property instanceof FieldMetadata)) { |
|
| 394 | + if ( ! ($property instanceof FieldMetadata)) { |
|
| 395 | 395 | continue; |
| 396 | 396 | } |
| 397 | 397 | |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
| 507 | 507 | { |
| 508 | 508 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
| 509 | - if (! ($property instanceof AssociationMetadata)) { |
|
| 509 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
| 510 | 510 | continue; |
| 511 | 511 | } |
| 512 | 512 | |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | continue; |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | - if (! $property->isOwningSide()) { |
|
| 517 | + if ( ! $property->isOwningSide()) { |
|
| 518 | 518 | continue; |
| 519 | 519 | } |
| 520 | 520 | |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | $idColumns = $class->getIdentifierColumns($this->em); |
| 605 | 605 | $idColumnNameList = array_keys($idColumns); |
| 606 | 606 | |
| 607 | - if (! in_array($referencedColumnName, $idColumnNameList)) { |
|
| 607 | + if ( ! in_array($referencedColumnName, $idColumnNameList)) { |
|
| 608 | 608 | return null; |
| 609 | 609 | } |
| 610 | 610 | |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
| 613 | 613 | $property = $class->getProperty($fieldName); |
| 614 | 614 | |
| 615 | - if (! ($property instanceof AssociationMetadata)) { |
|
| 615 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
| 616 | 616 | continue; |
| 617 | 617 | } |
| 618 | 618 | |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | $joinColumn->getReferencedColumnName() |
| 669 | 669 | ); |
| 670 | 670 | |
| 671 | - if (! $definingClass) { |
|
| 671 | + if ( ! $definingClass) { |
|
| 672 | 672 | throw new \Doctrine\ORM\ORMException(sprintf( |
| 673 | 673 | 'Column name "%s" referenced for relation from %s towards %s does not exist.', |
| 674 | 674 | $joinColumn->getReferencedColumnName(), |
@@ -684,14 +684,14 @@ discard block |
||
| 684 | 684 | $localColumns[] = $quotedColumnName; |
| 685 | 685 | $foreignColumns[] = $quotedReferencedColumnName; |
| 686 | 686 | |
| 687 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
| 687 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
| 688 | 688 | // Only add the column to the table if it does not exist already. |
| 689 | 689 | // It might exist already if the foreign key is mapped into a regular |
| 690 | 690 | // property as well. |
| 691 | 691 | $property = $definingClass->getProperty($referencedFieldName); |
| 692 | 692 | $columnDef = null; |
| 693 | 693 | |
| 694 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
| 694 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
| 695 | 695 | $columnDef = $joinColumn->getColumnDefinition(); |
| 696 | 696 | } elseif ($property->getColumnDefinition()) { |
| 697 | 697 | $columnDef = $property->getColumnDefinition(); |
@@ -725,7 +725,7 @@ discard block |
||
| 725 | 725 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | - if (! empty($joinColumn->getOnDelete())) { |
|
| 728 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
| 729 | 729 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
| 730 | 730 | } |
| 731 | 731 | } |
@@ -736,7 +736,7 @@ discard block |
||
| 736 | 736 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
| 737 | 737 | } |
| 738 | 738 | |
| 739 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
| 739 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
| 740 | 740 | |
| 741 | 741 | if (isset($addedFks[$compositeName]) |
| 742 | 742 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | } |
| 754 | 754 | |
| 755 | 755 | $blacklistedFks[$compositeName] = true; |
| 756 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
| 756 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
| 757 | 757 | $addedFks[$compositeName] = [ |
| 758 | 758 | 'foreignTableName' => $foreignTableName, |
| 759 | 759 | 'foreignColumns' => $foreignColumns, |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | $fullSchema = $sm->createSchema(); |
| 836 | 836 | |
| 837 | 837 | foreach ($fullSchema->getTables() as $table) { |
| 838 | - if (! $schema->hasTable($table->getName())) { |
|
| 838 | + if ( ! $schema->hasTable($table->getName())) { |
|
| 839 | 839 | foreach ($table->getForeignKeys() as $foreignKey) { |
| 840 | 840 | /* @var $foreignKey \Doctrine\DBAL\Schema\ForeignKeyConstraint */ |
| 841 | 841 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -860,7 +860,7 @@ discard block |
||
| 860 | 860 | if ($table->hasPrimaryKey()) { |
| 861 | 861 | $columns = $table->getPrimaryKey()->getColumns(); |
| 862 | 862 | if (count($columns) === 1) { |
| 863 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
| 863 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
| 864 | 864 | if ($fullSchema->hasSequence($checkSequence)) { |
| 865 | 865 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
| 866 | 866 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Tools\Pagination; |
| 6 | 6 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | if ($property instanceof AssociationMetadata) { |
| 53 | 53 | throw new \RuntimeException( |
| 54 | - 'Paginating an entity with foreign key as identifier only works when using the Output Walkers. ' . |
|
| 54 | + 'Paginating an entity with foreign key as identifier only works when using the Output Walkers. '. |
|
| 55 | 55 | 'Call Paginator#setUseOutputWalkers(true) before iterating the paginator.' |
| 56 | 56 | ); |
| 57 | 57 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $AST->selectClause->selectExpressions = [new SelectExpression($pathExpression, '_dctrn_id')]; |
| 70 | 70 | $AST->selectClause->isDistinct = true; |
| 71 | 71 | |
| 72 | - if (! isset($AST->orderByClause)) { |
|
| 72 | + if ( ! isset($AST->orderByClause)) { |
|
| 73 | 73 | return; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | if ($item->expression instanceof PathExpression) { |
| 78 | 78 | $AST->selectClause->selectExpressions[] = new SelectExpression( |
| 79 | 79 | $this->createSelectExpressionItem($item->expression), |
| 80 | - '_dctrn_ord' . $this->aliasCounter++ |
|
| 80 | + '_dctrn_ord'.$this->aliasCounter++ |
|
| 81 | 81 | ); |
| 82 | 82 | |
| 83 | 83 | continue; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\ORM\Tools\Pagination; |
| 6 | 6 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | [$pathExpression] |
| 88 | 88 | ); |
| 89 | 89 | $expression = new InExpression($arithmeticExpression); |
| 90 | - $expression->literals[] = new InputParameter(':' . self::PAGINATOR_ID_ALIAS); |
|
| 90 | + $expression->literals[] = new InputParameter(':'.self::PAGINATOR_ID_ALIAS); |
|
| 91 | 91 | } else { |
| 92 | 92 | $expression = new NullComparisonExpression($pathExpression); |
| 93 | 93 | $expression->not = false; |