@@ -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,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,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,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 |
@@ -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\Persisters\Entity; |
6 | 6 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
49 | 49 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
50 | 50 | |
51 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
51 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
52 | 52 | |
53 | 53 | // Append subclass columns |
54 | 54 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | /** @var JoinColumnMetadata $joinColumn */ |
73 | 73 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
74 | 74 | |
75 | - if (! $joinColumn->getType()) { |
|
75 | + if ( ! $joinColumn->getType()) { |
|
76 | 76 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
77 | 77 | } |
78 | 78 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $conditionSql .= ' AND '; |
127 | 127 | } |
128 | 128 | |
129 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
129 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $conditionSql .= ' AND '; |
141 | 141 | } |
142 | 142 | |
143 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
143 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | return sprintf( |
169 | 169 | '%s IN (%s)', |
170 | - $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform), |
|
170 | + $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform), |
|
171 | 171 | implode(', ', $values) |
172 | 172 | ); |
173 | 173 | } |
@@ -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\Utility; |
7 | 7 | |
@@ -62,14 +62,14 @@ discard block |
||
62 | 62 | |
63 | 63 | // iterate over association mappings |
64 | 64 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
65 | - if (! ($association instanceof AssociationMetadata)) { |
|
65 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
66 | 66 | continue; |
67 | 67 | } |
68 | 68 | |
69 | 69 | // resolve join columns over to-one or to-many |
70 | 70 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
71 | 71 | |
72 | - if (! $association->isOwningSide()) { |
|
72 | + if ( ! $association->isOwningSide()) { |
|
73 | 73 | $association = $targetClass->getProperty($association->getMappedBy()); |
74 | 74 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
75 | 75 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\Models\Cache; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Mapping\Driver\Annotation\Binder; |
6 | 6 |