@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $ce = []; |
80 | 80 | |
81 | 81 | foreach ($class->getPropertiesIterator() as $fieldName => $association) { |
82 | - if (! ($association instanceof AssociationMetadata)) { |
|
82 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | foreach ($class->getSubClasses() as $subClass) { |
90 | - if (! \in_array($class->getClassName(), \class_parents($subClass), true)) { |
|
90 | + if ( ! \in_array($class->getClassName(), \class_parents($subClass), true)) { |
|
91 | 91 | $message = "According to the discriminator map class, '%s' has to be a child of '%s', but these entities are not related through inheritance."; |
92 | 92 | |
93 | 93 | $ce[] = \sprintf($message, $subClass, $class->getClassName()); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $fieldName = $association->getName(); |
107 | 107 | $targetEntity = $association->getTargetEntity(); |
108 | 108 | |
109 | - if (! \class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
109 | + if ( ! \class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) { |
|
110 | 110 | $message = "The target entity '%s' specified on %s#%s is unknown or not an entity."; |
111 | 111 | |
112 | 112 | return [\sprintf($message, $targetEntity, $class->getClassName(), $fieldName)]; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | /** @var ClassMetadata $targetMetadata */ |
127 | 127 | $targetMetadata = $metadataFactory->getMetadataFor($targetEntity); |
128 | - $containsForeignId = \array_filter($targetMetadata->identifier, static function ($identifier) use ($targetMetadata) { |
|
128 | + $containsForeignId = \array_filter($targetMetadata->identifier, static function($identifier) use ($targetMetadata) { |
|
129 | 129 | $targetProperty = $targetMetadata->getProperty($identifier); |
130 | 130 | |
131 | 131 | return $targetProperty instanceof AssociationMetadata; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | /** @var AssociationMetadata $targetAssociation */ |
142 | 142 | $targetAssociation = $targetMetadata->getProperty($mappedBy); |
143 | 143 | |
144 | - if (! $targetAssociation) { |
|
144 | + if ( ! $targetAssociation) { |
|
145 | 145 | $message = 'The association %s#%s refers to the owning side property %s#%s which does not exist.'; |
146 | 146 | |
147 | 147 | $ce[] = \sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | /** @var AssociationMetadata $targetAssociation */ |
166 | 166 | $targetAssociation = $targetMetadata->getProperty($inversedBy); |
167 | 167 | |
168 | - if (! $targetAssociation) { |
|
168 | + if ( ! $targetAssociation) { |
|
169 | 169 | $message = 'The association %s#%s refers to the inverse side property %s#%s which does not exist.'; |
170 | 170 | |
171 | 171 | $ce[] = \sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $joinTable = $association->getJoinTable(); |
210 | 210 | |
211 | 211 | foreach ($joinTable->getJoinColumns() as $joinColumn) { |
212 | - if (! \in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) { |
|
212 | + if ( ! \in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns, true)) { |
|
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(), $class->getClassName()); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) { |
221 | - if (! \in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) { |
|
221 | + if ( ! \in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns, true)) { |
|
222 | 222 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
223 | 223 | |
224 | 224 | $ce[] = \sprintf($message, $inverseJoinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | if (\count($targetIdentifierColumns) !== \count($joinTable->getInverseJoinColumns())) { |
230 | 230 | $columnNames = \array_map( |
231 | - static function (JoinColumnMetadata $joinColumn) { |
|
231 | + static function(JoinColumnMetadata $joinColumn) { |
|
232 | 232 | return $joinColumn->getReferencedColumnName(); |
233 | 233 | }, |
234 | 234 | $joinTable->getInverseJoinColumns() |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | |
244 | 244 | if (\count($classIdentifierColumns) !== \count($joinTable->getJoinColumns())) { |
245 | 245 | $columnNames = \array_map( |
246 | - static function (JoinColumnMetadata $joinColumn) { |
|
246 | + static function(JoinColumnMetadata $joinColumn) { |
|
247 | 247 | return $joinColumn->getReferencedColumnName(); |
248 | 248 | }, |
249 | 249 | $joinTable->getJoinColumns() |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $joinColumns = $association->getJoinColumns(); |
261 | 261 | |
262 | 262 | foreach ($joinColumns as $joinColumn) { |
263 | - if (! \in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) { |
|
263 | + if ( ! \in_array($joinColumn->getReferencedColumnName(), $identifierColumns, true)) { |
|
264 | 264 | $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'."; |
265 | 265 | |
266 | 266 | $ce[] = \sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName()); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | continue; |
292 | 292 | } |
293 | 293 | |
294 | - if (! ($targetProperty instanceof AssociationMetadata)) { |
|
294 | + if ( ! ($targetProperty instanceof AssociationMetadata)) { |
|
295 | 295 | $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'."; |
296 | 296 | |
297 | 297 | $ce[] = \sprintf($message, $class->getClassName(), $fieldName, $orderField, $targetMetadata->getClassName()); |
@@ -62,28 +62,28 @@ discard block |
||
62 | 62 | $fh = \fopen($this->file, 'xb+'); |
63 | 63 | |
64 | 64 | if (\count($identityMap) === 0) { |
65 | - \fwrite($fh, 'Flush Operation [' . $this->context . "] - Empty identity map.\n"); |
|
65 | + \fwrite($fh, 'Flush Operation ['.$this->context."] - Empty identity map.\n"); |
|
66 | 66 | |
67 | 67 | return; |
68 | 68 | } |
69 | 69 | |
70 | - \fwrite($fh, 'Flush Operation [' . $this->context . "] - Dumping identity map:\n"); |
|
70 | + \fwrite($fh, 'Flush Operation ['.$this->context."] - Dumping identity map:\n"); |
|
71 | 71 | |
72 | 72 | foreach ($identityMap as $className => $map) { |
73 | - \fwrite($fh, 'Class: ' . $className . "\n"); |
|
73 | + \fwrite($fh, 'Class: '.$className."\n"); |
|
74 | 74 | |
75 | 75 | foreach ($map as $entity) { |
76 | - \fwrite($fh, ' Entity: ' . $this->getIdString($entity, $uow) . ' ' . spl_object_id($entity) . "\n"); |
|
76 | + \fwrite($fh, ' Entity: '.$this->getIdString($entity, $uow).' '.spl_object_id($entity)."\n"); |
|
77 | 77 | \fwrite($fh, " Associations:\n"); |
78 | 78 | |
79 | 79 | $cm = $em->getClassMetadata($className); |
80 | 80 | |
81 | 81 | foreach ($cm->getPropertiesIterator() as $field => $association) { |
82 | - if (! ($association instanceof AssociationMetadata)) { |
|
82 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
86 | - \fwrite($fh, ' ' . $field . ' '); |
|
86 | + \fwrite($fh, ' '.$field.' '); |
|
87 | 87 | |
88 | 88 | $value = $association->getValue($entity); |
89 | 89 | |
@@ -98,21 +98,21 @@ discard block |
||
98 | 98 | \fwrite($fh, '[PROXY] '); |
99 | 99 | } |
100 | 100 | |
101 | - \fwrite($fh, $this->getIdString($value, $uow) . ' ' . spl_object_id($value) . "\n"); |
|
101 | + \fwrite($fh, $this->getIdString($value, $uow).' '.spl_object_id($value)."\n"); |
|
102 | 102 | } else { |
103 | 103 | $initialized = ! ($value instanceof PersistentCollection) || $value->isInitialized(); |
104 | 104 | |
105 | 105 | if ($initialized) { |
106 | - \fwrite($fh, '[INITIALIZED] ' . $this->getType($value) . ' ' . \count($value) . " elements\n"); |
|
106 | + \fwrite($fh, '[INITIALIZED] '.$this->getType($value).' '.\count($value)." elements\n"); |
|
107 | 107 | |
108 | 108 | foreach ($value as $obj) { |
109 | - \fwrite($fh, ' ' . $this->getIdString($obj, $uow) . ' ' . spl_object_id($obj) . "\n"); |
|
109 | + \fwrite($fh, ' '.$this->getIdString($obj, $uow).' '.spl_object_id($obj)."\n"); |
|
110 | 110 | } |
111 | 111 | } else { |
112 | - \fwrite($fh, '[PROXY] ' . $this->getType($value) . " unknown element size\n"); |
|
112 | + \fwrite($fh, '[PROXY] '.$this->getType($value)." unknown element size\n"); |
|
113 | 113 | |
114 | 114 | foreach ($value->unwrap() as $obj) { |
115 | - \fwrite($fh, ' ' . $this->getIdString($obj, $uow) . ' ' . spl_object_id($obj) . "\n"); |
|
115 | + \fwrite($fh, ' '.$this->getIdString($obj, $uow).' '.spl_object_id($obj)."\n"); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $idstring = ''; |
152 | 152 | |
153 | 153 | foreach ($ids as $k => $v) { |
154 | - $idstring .= $k . '=' . $v; |
|
154 | + $idstring .= $k.'='.$v; |
|
155 | 155 | } |
156 | 156 | } else { |
157 | 157 | $idstring = 'NEWOBJECT '; |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $metadata = $it->current(); |
61 | 61 | |
62 | 62 | foreach ($this->filter as $filter) { |
63 | - $pregResult = \preg_match('/' . $filter . '/', $metadata->getClassName()); |
|
63 | + $pregResult = \preg_match('/'.$filter.'/', $metadata->getClassName()); |
|
64 | 64 | |
65 | 65 | if ($pregResult === false) { |
66 | 66 | throw new RuntimeException( |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public static function fromClassAndAssociation(string $class, string $associationName) : self |
14 | 14 | { |
15 | 15 | return new self(\sprintf( |
16 | - 'Cannot match on %s::%s with a non-object value. Matching objects by id is ' . |
|
16 | + 'Cannot match on %s::%s with a non-object value. Matching objects by id is '. |
|
17 | 17 | 'not compatible with matching on an in-memory collection, which compares objects by reference.', |
18 | 18 | $class, |
19 | 19 | $associationName |
@@ -247,7 +247,7 @@ |
||
247 | 247 | |
248 | 248 | // 2) Build insert table records into temporary table |
249 | 249 | $dql = ' SELECT t0.' . \implode(', t0.', $rootClass->getIdentifierFieldNames()) |
250 | - . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner'; |
|
250 | + . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner'; |
|
251 | 251 | $query = $this->em->createQuery($dql)->setParameter('owner', $collection->getOwner()); |
252 | 252 | |
253 | 253 | $statement = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ') ' . $query->getSQL(); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // the entire collection with a new would trigger this operation. |
34 | 34 | $association = $collection->getMapping(); |
35 | 35 | |
36 | - if (! $association->isOrphanRemoval()) { |
|
36 | + if ( ! $association->isOrphanRemoval()) { |
|
37 | 37 | // Handling non-orphan removal should never happen, as @OneToMany |
38 | 38 | // can only be inverse side. For owning side one to many, it is |
39 | 39 | // required to have a join table, which would classify as a ManyToManyPersister. |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $association = $collection->getMapping(); |
67 | 67 | |
68 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
68 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
69 | 69 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
70 | 70 | } |
71 | 71 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | { |
115 | 115 | $association = $collection->getMapping(); |
116 | 116 | |
117 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
117 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
118 | 118 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
119 | 119 | } |
120 | 120 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | public function contains(PersistentCollection $collection, $element) |
138 | 138 | { |
139 | - if (! $this->isValidEntityState($element)) { |
|
139 | + if ( ! $this->isValidEntityState($element)) { |
|
140 | 140 | return false; |
141 | 141 | } |
142 | 142 | |
@@ -160,12 +160,12 @@ discard block |
||
160 | 160 | { |
161 | 161 | $association = $collection->getMapping(); |
162 | 162 | |
163 | - if (! $association->isOrphanRemoval()) { |
|
163 | + if ( ! $association->isOrphanRemoval()) { |
|
164 | 164 | // no-op: this is not the owning side, therefore no operations should be applied |
165 | 165 | return false; |
166 | 166 | } |
167 | 167 | |
168 | - if (! $this->isValidEntityState($element)) { |
|
168 | + if ( ! $this->isValidEntityState($element)) { |
|
169 | 169 | return false; |
170 | 170 | } |
171 | 171 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | $tableName = $targetClass->table->getQuotedQualifiedName($this->platform); |
206 | - $statement = 'DELETE FROM ' . $tableName . ' WHERE ' . \implode(' = ? AND ', $columns) . ' = ?'; |
|
206 | + $statement = 'DELETE FROM '.$tableName.' WHERE '.\implode(' = ? AND ', $columns).' = ?'; |
|
207 | 207 | |
208 | 208 | return $this->conn->executeUpdate($statement, $parameters); |
209 | 209 | } |
@@ -240,17 +240,17 @@ discard block |
||
240 | 240 | ]; |
241 | 241 | } |
242 | 242 | |
243 | - $statement = $this->platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable |
|
244 | - . ' (' . $this->platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
243 | + $statement = $this->platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable |
|
244 | + . ' ('.$this->platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
245 | 245 | |
246 | 246 | $this->conn->executeUpdate($statement); |
247 | 247 | |
248 | 248 | // 2) Build insert table records into temporary table |
249 | - $dql = ' SELECT t0.' . \implode(', t0.', $rootClass->getIdentifierFieldNames()) |
|
250 | - . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner'; |
|
249 | + $dql = ' SELECT t0.'.\implode(', t0.', $rootClass->getIdentifierFieldNames()) |
|
250 | + . ' FROM '.$targetClass->getClassName().' t0 WHERE t0.'.$association->getMappedBy().' = :owner'; |
|
251 | 251 | $query = $this->em->createQuery($dql)->setParameter('owner', $collection->getOwner()); |
252 | 252 | |
253 | - $statement = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ') ' . $query->getSQL(); |
|
253 | + $statement = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.') '.$query->getSQL(); |
|
254 | 254 | $parameters = \array_values($sourcePersister->getIdentifier($collection->getOwner())); |
255 | 255 | $numDeleted = $this->conn->executeUpdate($statement, $parameters); |
256 | 256 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | // 4) Delete records on each table in the hierarchy |
266 | 266 | $hierarchyClasses = \array_merge( |
267 | 267 | \array_map( |
268 | - function ($className) { |
|
268 | + function($className) { |
|
269 | 269 | return $this->em->getClassMetadata($className); |
270 | 270 | }, |
271 | 271 | \array_reverse($targetClass->getSubClasses()) |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $association = $collection->getMapping(); |
39 | 39 | |
40 | - if (! $association->isOwningSide()) { |
|
40 | + if ( ! $association->isOwningSide()) { |
|
41 | 41 | return; // ignore inverse side |
42 | 42 | } |
43 | 43 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** @var JoinColumnMetadata $joinColumn */ |
50 | 50 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
51 | 51 | |
52 | - if (! $joinColumn->getType()) { |
|
52 | + if ( ! $joinColumn->getType()) { |
|
53 | 53 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
54 | 54 | } |
55 | 55 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $association = $collection->getMapping(); |
71 | 71 | |
72 | - if (! $association->isOwningSide()) { |
|
72 | + if ( ! $association->isOwningSide()) { |
|
73 | 73 | return; // ignore inverse side |
74 | 74 | } |
75 | 75 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | $association = $collection->getMapping(); |
102 | 102 | |
103 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
103 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
104 | 104 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
105 | 105 | } |
106 | 106 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
145 | 145 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
146 | 146 | |
147 | - if (! $joinColumn->getType()) { |
|
147 | + if ( ! $joinColumn->getType()) { |
|
148 | 148 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
149 | 149 | } |
150 | 150 | |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | }*/ |
177 | 177 | |
178 | 178 | $sql = 'SELECT COUNT(*)' |
179 | - . ' FROM ' . $joinTableName . ' t' |
|
179 | + . ' FROM '.$joinTableName.' t' |
|
180 | 180 | . $joinTargetEntitySQL |
181 | - . ' WHERE ' . \implode(' AND ', $conditions); |
|
181 | + . ' WHERE '.\implode(' AND ', $conditions); |
|
182 | 182 | |
183 | 183 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
184 | 184 | } |
@@ -201,13 +201,13 @@ discard block |
||
201 | 201 | { |
202 | 202 | $association = $collection->getMapping(); |
203 | 203 | |
204 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
204 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
205 | 205 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
206 | 206 | } |
207 | 207 | |
208 | 208 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
209 | 209 | |
210 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . \implode(' AND ', $whereClauses); |
|
210 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.\implode(' AND ', $whereClauses); |
|
211 | 211 | |
212 | 212 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
213 | 213 | } |
@@ -217,13 +217,13 @@ discard block |
||
217 | 217 | */ |
218 | 218 | public function contains(PersistentCollection $collection, $element) |
219 | 219 | { |
220 | - if (! $this->isValidEntityState($element)) { |
|
220 | + if ( ! $this->isValidEntityState($element)) { |
|
221 | 221 | return false; |
222 | 222 | } |
223 | 223 | |
224 | 224 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, true); |
225 | 225 | |
226 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . \implode(' AND ', $whereClauses); |
|
226 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.\implode(' AND ', $whereClauses); |
|
227 | 227 | |
228 | 228 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
229 | 229 | } |
@@ -233,13 +233,13 @@ discard block |
||
233 | 233 | */ |
234 | 234 | public function removeElement(PersistentCollection $collection, $element) |
235 | 235 | { |
236 | - if (! $this->isValidEntityState($element)) { |
|
236 | + if ( ! $this->isValidEntityState($element)) { |
|
237 | 237 | return false; |
238 | 238 | } |
239 | 239 | |
240 | 240 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, false); |
241 | 241 | |
242 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . \implode(' AND ', $whereClauses); |
|
242 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.\implode(' AND ', $whereClauses); |
|
243 | 243 | |
244 | 244 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
245 | 245 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $onConditions = $this->getOnConditionSQL($association); |
258 | 258 | $whereClauses = $params = $types = []; |
259 | 259 | |
260 | - if (! $association->isOwningSide()) { |
|
260 | + if ( ! $association->isOwningSide()) { |
|
261 | 261 | $association = $targetClass->getProperty($association->getMappedBy()); |
262 | 262 | $joinColumns = $association->getJoinTable()->getInverseJoinColumns(); |
263 | 263 | } else { |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
270 | 270 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
271 | 271 | |
272 | - if (! $joinColumn->getType()) { |
|
272 | + if ( ! $joinColumn->getType()) { |
|
273 | 273 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $ownerMetadata, $this->em)); |
274 | 274 | } |
275 | 275 | |
@@ -297,11 +297,11 @@ discard block |
||
297 | 297 | |
298 | 298 | $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te'); |
299 | 299 | |
300 | - $sql = 'SELECT ' . $resultSetMapping->generateSelectClause() |
|
301 | - . ' FROM ' . $tableName . ' te' |
|
302 | - . ' JOIN ' . $joinTableName . ' t ON' |
|
300 | + $sql = 'SELECT '.$resultSetMapping->generateSelectClause() |
|
301 | + . ' FROM '.$tableName.' te' |
|
302 | + . ' JOIN '.$joinTableName.' t ON' |
|
303 | 303 | . \implode(' AND ', $onConditions) |
304 | - . ' WHERE ' . \implode(' AND ', $whereClauses); |
|
304 | + . ' WHERE '.\implode(' AND ', $whereClauses); |
|
305 | 305 | |
306 | 306 | $sql .= $this->getOrderingSql($criteria, $targetClass); |
307 | 307 | $sql .= $this->getLimitSql($criteria); |
@@ -336,8 +336,8 @@ discard block |
||
336 | 336 | |
337 | 337 | // A join is needed if there is filtering on the target entity |
338 | 338 | $tableName = $rootClass->table->getQuotedQualifiedName($this->platform); |
339 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
340 | - . ' ON' . \implode(' AND ', $this->getOnConditionSQL($association)); |
|
339 | + $joinSql = ' JOIN '.$tableName.' te' |
|
340 | + . ' ON'.\implode(' AND ', $this->getOnConditionSQL($association)); |
|
341 | 341 | |
342 | 342 | return [$joinSql, $filterSql]; |
343 | 343 | } |
@@ -358,18 +358,18 @@ discard block |
||
358 | 358 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
359 | 359 | |
360 | 360 | if ($filterExpr) { |
361 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
361 | + $filterClauses[] = '('.$filterExpr.')'; |
|
362 | 362 | } |
363 | 363 | } |
364 | 364 | |
365 | - if (! $filterClauses) { |
|
365 | + if ( ! $filterClauses) { |
|
366 | 366 | return ''; |
367 | 367 | } |
368 | 368 | |
369 | 369 | $filterSql = \implode(' AND ', $filterClauses); |
370 | 370 | |
371 | 371 | return isset($filterClauses[1]) |
372 | - ? '(' . $filterSql . ')' |
|
372 | + ? '('.$filterSql.')' |
|
373 | 373 | : $filterSql; |
374 | 374 | } |
375 | 375 | |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
397 | 397 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
398 | 398 | |
399 | - $conditions[] = ' t.' . $quotedColumnName . ' = te.' . $quotedReferencedColumnName; |
|
399 | + $conditions[] = ' t.'.$quotedColumnName.' = te.'.$quotedReferencedColumnName; |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | return $conditions; |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
419 | 419 | } |
420 | 420 | |
421 | - return 'DELETE FROM ' . $joinTableName . ' WHERE ' . \implode(' = ? AND ', $columns) . ' = ?'; |
|
421 | + return 'DELETE FROM '.$joinTableName.' WHERE '.\implode(' = ? AND ', $columns).' = ?'; |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | /** |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
474 | 474 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
475 | 475 | |
476 | - if (! $joinColumn->getType()) { |
|
476 | + if ( ! $joinColumn->getType()) { |
|
477 | 477 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
478 | 478 | } |
479 | 479 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
487 | 487 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
488 | 488 | |
489 | - if (! $joinColumn->getType()) { |
|
489 | + if ( ! $joinColumn->getType()) { |
|
490 | 490 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
491 | 491 | } |
492 | 492 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
538 | 538 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
539 | 539 | |
540 | - if (! $joinColumn->getType()) { |
|
540 | + if ( ! $joinColumn->getType()) { |
|
541 | 541 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
542 | 542 | } |
543 | 543 | |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
551 | 551 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
552 | 552 | |
553 | - if (! $joinColumn->getType()) { |
|
553 | + if ( ! $joinColumn->getType()) { |
|
554 | 554 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
555 | 555 | } |
556 | 556 | |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
635 | 635 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
636 | 636 | |
637 | - if (! $owningAssociation->isOwningSide()) { |
|
637 | + if ( ! $owningAssociation->isOwningSide()) { |
|
638 | 638 | $owningAssociation = $targetClass->getProperty($owningAssociation->getMappedBy()); |
639 | 639 | $joinTable = $owningAssociation->getJoinTable(); |
640 | 640 | $joinColumns = $joinTable->getJoinColumns(); |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | } |
647 | 647 | |
648 | 648 | $joinTableName = $joinTable->getQuotedQualifiedName($this->platform); |
649 | - $quotedJoinTable = $joinTableName . ' t'; |
|
649 | + $quotedJoinTable = $joinTableName.' t'; |
|
650 | 650 | $whereClauses = []; |
651 | 651 | $params = []; |
652 | 652 | $types = []; |
@@ -660,11 +660,11 @@ discard block |
||
660 | 660 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
661 | 661 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
662 | 662 | |
663 | - $joinConditions[] = ' t.' . $quotedColumnName . ' = tr.' . $quotedReferencedColumnName; |
|
663 | + $joinConditions[] = ' t.'.$quotedColumnName.' = tr.'.$quotedReferencedColumnName; |
|
664 | 664 | } |
665 | 665 | |
666 | 666 | $tableName = $targetClass->table->getQuotedQualifiedName($this->platform); |
667 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . \implode(' AND ', $joinConditions); |
|
667 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.\implode(' AND ', $joinConditions); |
|
668 | 668 | $indexByProperty = $targetClass->getProperty($indexBy); |
669 | 669 | |
670 | 670 | switch (true) { |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
688 | 688 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
689 | 689 | |
690 | - if (! $joinColumn->getType()) { |
|
690 | + if ( ! $joinColumn->getType()) { |
|
691 | 691 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
692 | 692 | } |
693 | 693 | |
@@ -696,13 +696,13 @@ discard block |
||
696 | 696 | $types[] = $joinColumn->getType(); |
697 | 697 | } |
698 | 698 | |
699 | - if (! $joinNeeded) { |
|
699 | + if ( ! $joinNeeded) { |
|
700 | 700 | foreach ($joinColumns as $joinColumn) { |
701 | 701 | /** @var JoinColumnMetadata $joinColumn */ |
702 | 702 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
703 | 703 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
704 | 704 | |
705 | - if (! $joinColumn->getType()) { |
|
705 | + if ( ! $joinColumn->getType()) { |
|
706 | 706 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
707 | 707 | } |
708 | 708 | |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association); |
717 | 717 | |
718 | 718 | if ($filterSql) { |
719 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
719 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
720 | 720 | $whereClauses[] = $filterSql; |
721 | 721 | } |
722 | 722 | } |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | $association = $collection->getMapping(); |
740 | 740 | $owningAssociation = $association; |
741 | 741 | |
742 | - if (! $association->isOwningSide()) { |
|
742 | + if ( ! $association->isOwningSide()) { |
|
743 | 743 | $sourceClass = $this->em->getClassMetadata($association->getTargetEntity()); |
744 | 744 | $targetClass = $this->em->getClassMetadata($association->getSourceEntity()); |
745 | 745 | $sourceIdentifier = $this->uow->getEntityIdentifier($element); |
@@ -765,11 +765,11 @@ discard block |
||
765 | 765 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
766 | 766 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
767 | 767 | |
768 | - if (! $joinColumn->getType()) { |
|
768 | + if ( ! $joinColumn->getType()) { |
|
769 | 769 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
770 | 770 | } |
771 | 771 | |
772 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
772 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
773 | 773 | $params[] = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]]; |
774 | 774 | $types[] = $joinColumn->getType(); |
775 | 775 | } |
@@ -779,11 +779,11 @@ discard block |
||
779 | 779 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
780 | 780 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
781 | 781 | |
782 | - if (! $joinColumn->getType()) { |
|
782 | + if ( ! $joinColumn->getType()) { |
|
783 | 783 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
784 | 784 | } |
785 | 785 | |
786 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
786 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
787 | 787 | $params[] = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]]; |
788 | 788 | $types[] = $joinColumn->getType(); |
789 | 789 | } |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association); |
795 | 795 | |
796 | 796 | if ($filterSql) { |
797 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
797 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
798 | 798 | $whereClauses[] = $filterSql; |
799 | 799 | } |
800 | 800 | } |
@@ -839,10 +839,10 @@ discard block |
||
839 | 839 | $property = $targetClass->getProperty($name); |
840 | 840 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
841 | 841 | |
842 | - $orderBy[] = $columnName . ' ' . $direction; |
|
842 | + $orderBy[] = $columnName.' '.$direction; |
|
843 | 843 | } |
844 | 844 | |
845 | - return ' ORDER BY ' . \implode(', ', $orderBy); |
|
845 | + return ' ORDER BY '.\implode(', ', $orderBy); |
|
846 | 846 | } |
847 | 847 | |
848 | 848 | return ''; |
@@ -74,11 +74,11 @@ |
||
74 | 74 | |
75 | 75 | switch ($expr->getType()) { |
76 | 76 | case CompositeExpression::TYPE_AND: |
77 | - return '(' . \implode(' AND ', $expressionList) . ')'; |
|
77 | + return '('.\implode(' AND ', $expressionList).')'; |
|
78 | 78 | case CompositeExpression::TYPE_OR: |
79 | - return '(' . \implode(' OR ', $expressionList) . ')'; |
|
79 | + return '('.\implode(' OR ', $expressionList).')'; |
|
80 | 80 | default: |
81 | - throw new RuntimeException('Unknown composite ' . $expr->getType()); |
|
81 | + throw new RuntimeException('Unknown composite '.$expr->getType()); |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
46 | 46 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
47 | 47 | |
48 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
48 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
49 | 49 | |
50 | 50 | // Append subclass columns |
51 | 51 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** @var JoinColumnMetadata $joinColumn */ |
70 | 70 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
71 | 71 | |
72 | - if (! $joinColumn->getType()) { |
|
72 | + if ( ! $joinColumn->getType()) { |
|
73 | 73 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
74 | 74 | } |
75 | 75 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $conditionSql .= ' AND '; |
124 | 124 | } |
125 | 125 | |
126 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
126 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $conditionSql .= ' AND '; |
138 | 138 | } |
139 | 139 | |
140 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
140 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | return \sprintf( |
166 | 166 | '%s IN (%s)', |
167 | - $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform), |
|
167 | + $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform), |
|
168 | 168 | \implode(', ', $values) |
169 | 169 | ); |
170 | 170 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | foreach ($data as $columnName => $value) { |
112 | - if (! \is_array($id) || ! isset($id[$columnName])) { |
|
112 | + if ( ! \is_array($id) || ! isset($id[$columnName])) { |
|
113 | 113 | $type = $this->columns[$columnName]->getType(); |
114 | 114 | |
115 | 115 | $stmt->bindValue($paramIndex++, $value, $type); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | $updateData = $this->prepareUpdateData($entity); |
135 | 135 | |
136 | - if (! $updateData) { |
|
136 | + if ( ! $updateData) { |
|
137 | 137 | return; |
138 | 138 | } |
139 | 139 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $versionedClass = $this->class->versionProperty->getDeclaringClass(); |
152 | 152 | $versionedTable = $versionedClass->getTableName(); |
153 | 153 | |
154 | - if (! isset($updateData[$versionedTable])) { |
|
154 | + if ( ! isset($updateData[$versionedTable])) { |
|
155 | 155 | $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform); |
156 | 156 | |
157 | 157 | $this->updateTable($entity, $tableName, [], true); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | if ($filterSql) { |
234 | 234 | $conditionSql .= $conditionSql |
235 | - ? ' AND ' . $filterSql |
|
235 | + ? ' AND '.$filterSql |
|
236 | 236 | : $filterSql; |
237 | 237 | } |
238 | 238 | |
@@ -240,26 +240,26 @@ discard block |
||
240 | 240 | |
241 | 241 | switch ($lockMode) { |
242 | 242 | case LockMode::PESSIMISTIC_READ: |
243 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
243 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
244 | 244 | break; |
245 | 245 | |
246 | 246 | case LockMode::PESSIMISTIC_WRITE: |
247 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
247 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
248 | 248 | break; |
249 | 249 | } |
250 | 250 | |
251 | 251 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
252 | - $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; |
|
253 | - $where = $conditionSql !== '' ? ' WHERE ' . $conditionSql : ''; |
|
252 | + $from = ' FROM '.$tableName.' '.$baseTableAlias; |
|
253 | + $where = $conditionSql !== '' ? ' WHERE '.$conditionSql : ''; |
|
254 | 254 | $lock = $this->platform->appendLockHint($from, $lockMode); |
255 | 255 | $columnList = $this->getSelectColumnsSQL(); |
256 | - $query = 'SELECT ' . $columnList |
|
256 | + $query = 'SELECT '.$columnList |
|
257 | 257 | . $lock |
258 | 258 | . $joinSql |
259 | 259 | . $where |
260 | 260 | . $orderBySql; |
261 | 261 | |
262 | - return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql; |
|
262 | + return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql; |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |
@@ -281,14 +281,14 @@ discard block |
||
281 | 281 | |
282 | 282 | if ($filterSql !== '') { |
283 | 283 | $conditionSql = $conditionSql |
284 | - ? $conditionSql . ' AND ' . $filterSql |
|
284 | + ? $conditionSql.' AND '.$filterSql |
|
285 | 285 | : $filterSql; |
286 | 286 | } |
287 | 287 | |
288 | 288 | return 'SELECT COUNT(*) ' |
289 | - . 'FROM ' . $tableName . ' ' . $baseTableAlias |
|
289 | + . 'FROM '.$tableName.' '.$baseTableAlias |
|
290 | 290 | . $joinSql |
291 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
291 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
@@ -307,18 +307,18 @@ discard block |
||
307 | 307 | $conditions = []; |
308 | 308 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
309 | 309 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
310 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
310 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
311 | 311 | |
312 | 312 | foreach ($identifierColumns as $idColumn) { |
313 | 313 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
314 | 314 | |
315 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
315 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | $joinSql .= \implode(' AND ', $conditions); |
319 | 319 | } |
320 | 320 | |
321 | - return parent::getLockTablesSql($lockMode) . $joinSql; |
|
321 | + return parent::getLockTablesSql($lockMode).$joinSql; |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | /** |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | continue; |
346 | 346 | } |
347 | 347 | |
348 | - if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
348 | + if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
349 | 349 | continue; |
350 | 350 | } |
351 | 351 | |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | /** @var JoinColumnMetadata $joinColumn */ |
356 | 356 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
357 | 357 | |
358 | - if (! $joinColumn->getType()) { |
|
358 | + if ( ! $joinColumn->getType()) { |
|
359 | 359 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
360 | 360 | } |
361 | 361 | |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
375 | 375 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
376 | 376 | |
377 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
377 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
378 | 378 | |
379 | 379 | // sub tables |
380 | 380 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | /** @var JoinColumnMetadata $joinColumn */ |
399 | 399 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
400 | 400 | |
401 | - if (! $joinColumn->getType()) { |
|
401 | + if ( ! $joinColumn->getType()) { |
|
402 | 402 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
403 | 403 | } |
404 | 404 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | $columnName = $joinColumn->getColumnName(); |
450 | 450 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
451 | 451 | |
452 | - if (! $joinColumn->getType()) { |
|
452 | + if ( ! $joinColumn->getType()) { |
|
453 | 453 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
454 | 454 | } |
455 | 455 | |
@@ -505,12 +505,12 @@ discard block |
||
505 | 505 | $conditions = []; |
506 | 506 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
507 | 507 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
508 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
508 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
509 | 509 | |
510 | 510 | foreach ($identifierColumns as $idColumn) { |
511 | 511 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
512 | 512 | |
513 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
513 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
514 | 514 | } |
515 | 515 | |
516 | 516 | $joinSql .= \implode(' AND ', $conditions); |
@@ -522,12 +522,12 @@ discard block |
||
522 | 522 | $subClass = $this->em->getClassMetadata($subClassName); |
523 | 523 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
524 | 524 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName()); |
525 | - $joinSql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
525 | + $joinSql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
526 | 526 | |
527 | 527 | foreach ($identifierColumns as $idColumn) { |
528 | 528 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
529 | 529 | |
530 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
530 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
531 | 531 | } |
532 | 532 | |
533 | 533 | $joinSql .= \implode(' AND ', $conditions); |