@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -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 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | public function generate(EntityManagerInterface $em, $entity) |
21 | 21 | { |
22 | 22 | $conn = $em->getConnection(); |
23 | - $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression(); |
|
23 | + $sql = 'SELECT '.$conn->getDatabasePlatform()->getGuidExpression(); |
|
24 | 24 | |
25 | 25 | return $conn->query($sql)->fetchColumn(0); |
26 | 26 | } |
@@ -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 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $ce = []; |
82 | 82 | |
83 | 83 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $association) { |
84 | - if (! ($association instanceof AssociationMetadata)) { |
|
84 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
85 | 85 | continue; |
86 | 86 | } |
87 | 87 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | foreach ($class->getSubClasses() as $subClass) { |
92 | - if (!in_array($class->getClassName(), class_parents($subClass))) { |
|
92 | + if ( ! in_array($class->getClassName(), class_parents($subClass))) { |
|
93 | 93 | $message = "According to the discriminator map class, '%s' has to be a child of '%s', but these entities are not related through inheritance."; |
94 | 94 | |
95 | 95 | $ce[] = sprintf($message, $subClass, $class->getClassName()); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $fieldName = $association->getName(); |
112 | 112 | $targetEntity = $association->getTargetEntity(); |
113 | 113 | |
114 | - if (!class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
114 | + if ( ! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
115 | 115 | $message = "The target entity '%s' specified on %s#%s is unknown or not an entity."; |
116 | 116 | |
117 | 117 | return [ |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | /** @var ClassMetadata $targetMetadata */ |
134 | 134 | $targetMetadata = $metadataFactory->getMetadataFor($targetEntity); |
135 | - $containsForeignId = array_filter($targetMetadata->identifier, function ($identifier) use ($targetMetadata) { |
|
135 | + $containsForeignId = array_filter($targetMetadata->identifier, function($identifier) use ($targetMetadata) { |
|
136 | 136 | $targetProperty = $targetMetadata->getProperty($identifier); |
137 | 137 | |
138 | 138 | return $targetProperty instanceof AssociationMetadata; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | /** @var AssociationMetadata $targetAssociation */ |
149 | 149 | $targetAssociation = $targetMetadata->getProperty($mappedBy); |
150 | 150 | |
151 | - if (! $targetAssociation) { |
|
151 | + if ( ! $targetAssociation) { |
|
152 | 152 | $message = "The association %s#%s refers to the owning side property %s#%s which does not exist."; |
153 | 153 | |
154 | 154 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | /** @var AssociationMetadata $targetAssociation */ |
173 | 173 | $targetAssociation = $targetMetadata->getProperty($inversedBy); |
174 | 174 | |
175 | - if (! $targetAssociation) { |
|
175 | + if ( ! $targetAssociation) { |
|
176 | 176 | $message = "The association %s#%s refers to the inverse side property %s#%s which does not exist."; |
177 | 177 | |
178 | 178 | $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $joinTable = $association->getJoinTable(); |
217 | 217 | |
218 | 218 | foreach ($joinTable->getJoinColumns() as $joinColumn) { |
219 | - if (! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns)) { |
|
219 | + if ( ! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns)) { |
|
220 | 220 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
221 | 221 | |
222 | 222 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $class->getClassName()); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) { |
228 | - if (! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns)) { |
|
228 | + if ( ! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns)) { |
|
229 | 229 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
230 | 230 | |
231 | 231 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | |
236 | 236 | if (count($targetIdentifierColumns) !== count($joinTable->getInverseJoinColumns())) { |
237 | 237 | $columnNames = array_map( |
238 | - function (JoinColumnMetadata $joinColumn) { |
|
238 | + function(JoinColumnMetadata $joinColumn) { |
|
239 | 239 | return $joinColumn->getReferencedColumnName(); |
240 | 240 | }, |
241 | 241 | $joinTable->getInverseJoinColumns() |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | if (count($classIdentifierColumns) !== count($joinTable->getJoinColumns())) { |
252 | 252 | $columnNames = array_map( |
253 | - function (JoinColumnMetadata $joinColumn) { |
|
253 | + function(JoinColumnMetadata $joinColumn) { |
|
254 | 254 | return $joinColumn->getReferencedColumnName(); |
255 | 255 | }, |
256 | 256 | $joinTable->getJoinColumns() |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $joinColumns = $association->getJoinColumns(); |
268 | 268 | |
269 | 269 | foreach ($joinColumns as $joinColumn) { |
270 | - if (!in_array($joinColumn->getReferencedColumnName(), $identifierColumns)) { |
|
270 | + if ( ! in_array($joinColumn->getReferencedColumnName(), $identifierColumns)) { |
|
271 | 271 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
272 | 272 | |
273 | 273 | $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | continue; |
299 | 299 | } |
300 | 300 | |
301 | - if (! ($targetProperty instanceof AssociationMetadata)) { |
|
301 | + if ( ! ($targetProperty instanceof AssociationMetadata)) { |
|
302 | 302 | $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'."; |
303 | 303 | |
304 | 304 | $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\Query\Exec; |
6 | 6 | |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
73 | 73 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 'i0', $updateClause->aliasIdentificationVariable); |
74 | 74 | |
75 | - $this->insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ')' |
|
76 | - . ' SELECT i0.' . implode(', i0.', array_keys($idColumns)); |
|
75 | + $this->insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.')' |
|
76 | + . ' SELECT i0.'.implode(', i0.', array_keys($idColumns)); |
|
77 | 77 | |
78 | 78 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->getClassName(), $updateClause->aliasIdentificationVariable); |
79 | 79 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | // 3. Create and store UPDATE statements |
92 | 92 | $hierarchyClasses = array_merge( |
93 | 93 | array_map( |
94 | - function ($className) use ($em) { return $em->getClassMetadata($className); }, |
|
94 | + function($className) use ($em) { return $em->getClassMetadata($className); }, |
|
95 | 95 | array_reverse($primaryClass->getSubClasses()) |
96 | 96 | ), |
97 | 97 | [$primaryClass], |
@@ -145,8 +145,8 @@ discard block |
||
145 | 145 | ]; |
146 | 146 | } |
147 | 147 | |
148 | - $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
149 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
148 | + $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
149 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
150 | 150 | |
151 | 151 | $this->dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
152 | 152 | } |
@@ -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\Query\Exec; |
6 | 6 | |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause() |
62 | 62 | $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 'i0', $primaryDqlAlias); |
63 | 63 | |
64 | - $this->insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ')' |
|
65 | - . ' SELECT i0.' . implode(', i0.', array_keys($idColumns)); |
|
64 | + $this->insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.')' |
|
65 | + . ' SELECT i0.'.implode(', i0.', array_keys($idColumns)); |
|
66 | 66 | |
67 | 67 | $rangeDecl = new AST\RangeVariableDeclaration($primaryClass->getClassName(), $primaryDqlAlias); |
68 | 68 | $fromClause = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | // 3. Create and store DELETE statements |
85 | 85 | $hierarchyClasses = array_merge( |
86 | 86 | array_map( |
87 | - function ($className) use ($em) { return $em->getClassMetadata($className); }, |
|
87 | + function($className) use ($em) { return $em->getClassMetadata($className); }, |
|
88 | 88 | array_reverse($primaryClass->getSubClasses()) |
89 | 89 | ), |
90 | 90 | [$primaryClass], |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | ]; |
106 | 106 | } |
107 | 107 | |
108 | - $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' |
|
109 | - . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
108 | + $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' (' |
|
109 | + . $platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
110 | 110 | |
111 | 111 | $this->dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable); |
112 | 112 | } |
@@ -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\Query; |
6 | 6 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $classMetadata = $this->em->getClassMetadata($class); |
147 | 147 | $platform = $this->em->getConnection()->getDatabasePlatform(); |
148 | 148 | |
149 | - if (! $this->isInheritanceSupported($classMetadata)) { |
|
149 | + if ( ! $this->isInheritanceSupported($classMetadata)) { |
|
150 | 150 | throw new \InvalidArgumentException( |
151 | 151 | 'ResultSetMapping builder does not currently support your inheritance scheme.' |
152 | 152 | ); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | ); |
187 | 187 | } |
188 | 188 | |
189 | - if (! $joinColumn->getType()) { |
|
189 | + if ( ! $joinColumn->getType()) { |
|
190 | 190 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
191 | 191 | } |
192 | 192 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | { |
228 | 228 | switch ($mode) { |
229 | 229 | case self::COLUMN_RENAMING_INCREMENT: |
230 | - return $columnName . $this->sqlCounter++; |
|
230 | + return $columnName.$this->sqlCounter++; |
|
231 | 231 | |
232 | 232 | case self::COLUMN_RENAMING_CUSTOM: |
233 | 233 | return $customRenameColumns[$columnName] ?? $columnName; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | { |
276 | 276 | $counter = 0; |
277 | 277 | $resultMapping = $class->getSqlResultSetMapping($resultSetMappingName); |
278 | - $rootAlias = 'e' . $counter; |
|
278 | + $rootAlias = 'e'.$counter; |
|
279 | 279 | |
280 | 280 | if (isset($resultMapping['entities'])) { |
281 | 281 | foreach ($resultMapping['entities'] as $key => $entityMapping) { |
@@ -290,12 +290,12 @@ discard block |
||
290 | 290 | $this->addEntityResult($classMetadata->getClassName(), $rootAlias); |
291 | 291 | $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias); |
292 | 292 | } else { |
293 | - $joinAlias = 'e' . ++$counter; |
|
293 | + $joinAlias = 'e'.++$counter; |
|
294 | 294 | |
295 | 295 | $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias); |
296 | 296 | |
297 | 297 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $association) { |
298 | - if (! ($association instanceof AssociationMetadata)) { |
|
298 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
299 | 299 | continue; |
300 | 300 | } |
301 | 301 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | |
358 | 358 | $property = $classMetadata->getProperty($fieldName); |
359 | 359 | |
360 | - if (! $relation && $property instanceof FieldMetadata) { |
|
360 | + if ( ! $relation && $property instanceof FieldMetadata) { |
|
361 | 361 | $this->addFieldResult($alias, $field['column'], $fieldName, $classMetadata->getClassName()); |
362 | 362 | |
363 | 363 | continue; |
@@ -365,14 +365,14 @@ discard block |
||
365 | 365 | |
366 | 366 | $property = $classMetadata->getProperty($relation); |
367 | 367 | |
368 | - if (! $property) { |
|
368 | + if ( ! $property) { |
|
369 | 369 | throw new \InvalidArgumentException( |
370 | 370 | "Entity '".$classMetadata->getClassName()."' has no field '".$relation."'. " |
371 | 371 | ); |
372 | 372 | } |
373 | 373 | |
374 | 374 | if ($property instanceof AssociationMetadata) { |
375 | - if (! $relation) { |
|
375 | + if ( ! $relation) { |
|
376 | 376 | $this->addFieldResult($alias, $field['column'], $fieldName, $classMetadata->getClassName()); |
377 | 377 | |
378 | 378 | continue; |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | ); |
417 | 417 | } |
418 | 418 | |
419 | - if (! $joinColumn->getType()) { |
|
419 | + if ( ! $joinColumn->getType()) { |
|
420 | 420 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
421 | 421 | } |
422 | 422 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | $sql .= ", "; |
453 | 453 | } |
454 | 454 | |
455 | - $sql .= $tableAlias . "."; |
|
455 | + $sql .= $tableAlias."."; |
|
456 | 456 | |
457 | 457 | if (isset($this->fieldMappings[$columnName])) { |
458 | 458 | $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]); |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | $sql .= $this->discriminatorColumns[$dqlAlias]; |
465 | 465 | } |
466 | 466 | |
467 | - $sql .= " AS " . $columnName; |
|
467 | + $sql .= " AS ".$columnName; |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | return $sql; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping\Exporter; |
7 | 7 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $lines[] = null; |
27 | 27 | |
28 | 28 | if ($namespace) { |
29 | - $lines[] = 'namespace ' . $namespace . ';'; |
|
29 | + $lines[] = 'namespace '.$namespace.';'; |
|
30 | 30 | $lines[] = null; |
31 | 31 | } |
32 | 32 | |
@@ -74,31 +74,31 @@ discard block |
||
74 | 74 | { |
75 | 75 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
76 | 76 | $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1); |
77 | - $objectReference = $bodyIndentation . static::VARIABLE; |
|
77 | + $objectReference = $bodyIndentation.static::VARIABLE; |
|
78 | 78 | $lines = []; |
79 | 79 | |
80 | - $lines[] = $indentation . 'public function __construct('; |
|
81 | - $lines[] = $bodyIndentation . 'ClassMetadataBuildingContext $metadataBuildingContext,'; |
|
82 | - $lines[] = $bodyIndentation . '?ClassMetadata $parent = null'; |
|
83 | - $lines[] = $indentation . ')'; |
|
84 | - $lines[] = $indentation . '{'; |
|
85 | - $lines[] = $bodyIndentation . 'parent::__construct("' . $metadata->getClassName() . '", $parent);'; |
|
80 | + $lines[] = $indentation.'public function __construct('; |
|
81 | + $lines[] = $bodyIndentation.'ClassMetadataBuildingContext $metadataBuildingContext,'; |
|
82 | + $lines[] = $bodyIndentation.'?ClassMetadata $parent = null'; |
|
83 | + $lines[] = $indentation.')'; |
|
84 | + $lines[] = $indentation.'{'; |
|
85 | + $lines[] = $bodyIndentation.'parent::__construct("'.$metadata->getClassName().'", $parent);'; |
|
86 | 86 | |
87 | 87 | if ($metadata->getCustomRepositoryClassName()) { |
88 | 88 | $lines[] = null; |
89 | - $lines[] = $objectReference . '->setCustomRepositoryClassName("' . $metadata->getCustomRepositoryClassName() . '");'; |
|
89 | + $lines[] = $objectReference.'->setCustomRepositoryClassName("'.$metadata->getCustomRepositoryClassName().'");'; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if ($metadata->changeTrackingPolicy) { |
93 | 93 | $lines[] = null; |
94 | - $lines[] = $objectReference . '->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::' . strtoupper($metadata->changeTrackingPolicy) . ');'; |
|
94 | + $lines[] = $objectReference.'->setChangeTrackingPolicy(Mapping\ChangeTrackingPolicy::'.strtoupper($metadata->changeTrackingPolicy).');'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | $lines[] = $this->exportInheritance($metadata, $indentationLevel); |
98 | 98 | $lines[] = $this->exportTable($metadata, $indentationLevel); |
99 | 99 | $lines[] = $this->exportProperties($metadata, $indentationLevel); |
100 | 100 | $lines[] = $this->exportLifecycleCallbacks($metadata, $indentationLevel); |
101 | - $lines[] = $indentation . '}'; |
|
101 | + $lines[] = $indentation.'}'; |
|
102 | 102 | |
103 | 103 | return implode(PHP_EOL, $lines); |
104 | 104 | } |
@@ -112,17 +112,17 @@ discard block |
||
112 | 112 | private function exportInheritance(Mapping\ClassMetadata $metadata, int $indentationLevel) : string |
113 | 113 | { |
114 | 114 | $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1); |
115 | - $objectReference = $bodyIndentation . static::VARIABLE; |
|
115 | + $objectReference = $bodyIndentation.static::VARIABLE; |
|
116 | 116 | $lines = []; |
117 | 117 | |
118 | 118 | if ($metadata->inheritanceType) { |
119 | 119 | $lines[] = null; |
120 | - $lines[] = $objectReference . '->setInheritanceType(Mapping\InheritanceType::' . strtoupper($metadata->inheritanceType) . ');'; |
|
120 | + $lines[] = $objectReference.'->setInheritanceType(Mapping\InheritanceType::'.strtoupper($metadata->inheritanceType).');'; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | if ($metadata->discriminatorColumn) { |
124 | 124 | $lines[] = null; |
125 | - $lines[] = $bodyIndentation . '// Discriminator mapping'; |
|
125 | + $lines[] = $bodyIndentation.'// Discriminator mapping'; |
|
126 | 126 | $lines[] = $this->exportDiscriminatorMetadata($metadata, $indentationLevel + 1); |
127 | 127 | } |
128 | 128 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | if ($metadata->table) { |
144 | 144 | $lines[] = null; |
145 | - $lines[] = $bodyIndentation . '// Table'; |
|
145 | + $lines[] = $bodyIndentation.'// Table'; |
|
146 | 146 | $lines[] = $this->exportTableMetadata($metadata->table, $indentationLevel + 1); |
147 | 147 | } |
148 | 148 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) { |
164 | 164 | $lines[] = null; |
165 | - $lines[] = $bodyIndentation . '// Property: ' . $name; |
|
165 | + $lines[] = $bodyIndentation.'// Property: '.$name; |
|
166 | 166 | $lines[] = $this->exportProperty($property, $indentationLevel + 1); |
167 | 167 | } |
168 | 168 | |
@@ -178,16 +178,16 @@ discard block |
||
178 | 178 | private function exportLifecycleCallbacks(Mapping\ClassMetadata $metadata, int $indentationLevel) : string |
179 | 179 | { |
180 | 180 | $bodyIndentation = str_repeat(self::INDENTATION, $indentationLevel + 1); |
181 | - $objectReference = $bodyIndentation . static::VARIABLE; |
|
181 | + $objectReference = $bodyIndentation.static::VARIABLE; |
|
182 | 182 | $lines = []; |
183 | 183 | |
184 | 184 | if ($metadata->lifecycleCallbacks) { |
185 | 185 | $lines[] = null; |
186 | - $lines[] = $bodyIndentation . '// Lifecycle callbacks'; |
|
186 | + $lines[] = $bodyIndentation.'// Lifecycle callbacks'; |
|
187 | 187 | |
188 | 188 | foreach ($metadata->lifecycleCallbacks as $event => $callbacks) { |
189 | 189 | foreach ($callbacks as $callback) { |
190 | - $lines[] = $objectReference . '->addLifecycleCallback("' . $callback . '", "' . $event . '");'; |
|
190 | + $lines[] = $objectReference.'->addLifecycleCallback("'.$callback.'", "'.$event.'");'; |
|
191 | 191 | } |
192 | 192 | } |
193 | 193 | } |
@@ -206,17 +206,17 @@ discard block |
||
206 | 206 | $variableExporter = new VariableExporter(); |
207 | 207 | $discriminatorExporter = new DiscriminatorColumnMetadataExporter(); |
208 | 208 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
209 | - $objectReference = $indentation . static::VARIABLE; |
|
209 | + $objectReference = $indentation.static::VARIABLE; |
|
210 | 210 | $lines = []; |
211 | 211 | |
212 | 212 | $lines[] = $discriminatorExporter->export($metadata->discriminatorColumn, $indentationLevel); |
213 | 213 | $lines[] = null; |
214 | - $lines[] = $objectReference . '->setDiscriminatorColumn(' . $discriminatorExporter::VARIABLE . ');'; |
|
214 | + $lines[] = $objectReference.'->setDiscriminatorColumn('.$discriminatorExporter::VARIABLE.');'; |
|
215 | 215 | |
216 | 216 | if ($metadata->discriminatorMap) { |
217 | 217 | $discriminatorMap = $variableExporter->export($metadata->discriminatorMap, $indentationLevel + 1); |
218 | 218 | |
219 | - $lines[] = $objectReference . '->setDiscriminatorMap(' . $discriminatorMap . ');'; |
|
219 | + $lines[] = $objectReference.'->setDiscriminatorMap('.$discriminatorMap.');'; |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | return implode(PHP_EOL, $lines); |
@@ -232,12 +232,12 @@ discard block |
||
232 | 232 | { |
233 | 233 | $tableExporter = new TableMetadataExporter(); |
234 | 234 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
235 | - $objectReference = $indentation . static::VARIABLE; |
|
235 | + $objectReference = $indentation.static::VARIABLE; |
|
236 | 236 | $lines = []; |
237 | 237 | |
238 | 238 | $lines[] = $tableExporter->export($table, $indentationLevel); |
239 | 239 | $lines[] = null; |
240 | - $lines[] = $objectReference . '->setTable(' . $tableExporter::VARIABLE . ');'; |
|
240 | + $lines[] = $objectReference.'->setTable('.$tableExporter::VARIABLE.');'; |
|
241 | 241 | |
242 | 242 | return implode(PHP_EOL, $lines); |
243 | 243 | } |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | private function exportProperty(Mapping\Property $property, int $indentationLevel) : string |
252 | 252 | { |
253 | 253 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
254 | - $objectReference = $indentation . static::VARIABLE; |
|
254 | + $objectReference = $indentation.static::VARIABLE; |
|
255 | 255 | $lines = []; |
256 | 256 | |
257 | 257 | switch (true) { |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | |
287 | 287 | $lines[] = $propertyExporter->export($property, $indentationLevel); |
288 | 288 | $lines[] = null; |
289 | - $lines[] = $objectReference . '->addProperty(' . $propertyExporter::VARIABLE . ');'; |
|
289 | + $lines[] = $objectReference.'->addProperty('.$propertyExporter::VARIABLE.');'; |
|
290 | 290 | |
291 | 291 | return implode(PHP_EOL, $lines); |
292 | 292 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * <http://www.doctrine-project.org>. |
19 | 19 | */ |
20 | 20 | |
21 | -declare(strict_types=1); |
|
21 | +declare(strict_types = 1); |
|
22 | 22 | |
23 | 23 | namespace Doctrine\ORM\Mapping; |
24 | 24 |