@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | : $value; |
300 | 300 | |
301 | 301 | if ($cacheKeyInfo['isIdentifier'] && $value !== null) { |
302 | - $id[$dqlAlias] .= '|' . $value; |
|
302 | + $id[$dqlAlias] .= '|'.$value; |
|
303 | 303 | $nonemptyComponents[$dqlAlias] = true; |
304 | 304 | } |
305 | 305 | break; |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | if ( ! isset($cacheKeyInfo['isScalar'])) { |
338 | 338 | $dqlAlias = $cacheKeyInfo['dqlAlias']; |
339 | 339 | $type = $cacheKeyInfo['type']; |
340 | - $fieldName = $dqlAlias . '_' . $fieldName; |
|
340 | + $fieldName = $dqlAlias.'_'.$fieldName; |
|
341 | 341 | $value = $type |
342 | 342 | ? $type->convertToPHPValue($value, $this->_platform) |
343 | 343 | : $value; |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * Initiates a row-by-row hydration. |
109 | 109 | * |
110 | - * @param object $stmt |
|
111 | - * @param object $resultSetMapping |
|
110 | + * @param \Doctrine\DBAL\Driver\Statement $stmt |
|
111 | + * @param \Doctrine\ORM\Query\ResultSetMapping $resultSetMapping |
|
112 | 112 | * @param array $hints |
113 | 113 | * |
114 | 114 | * @return IterableResult |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | /** |
132 | 132 | * Hydrates all rows returned by the passed statement instance at once. |
133 | 133 | * |
134 | - * @param object $stmt |
|
135 | - * @param object $resultSetMapping |
|
134 | + * @param \Doctrine\DBAL\Driver\Statement $stmt |
|
135 | + * @param \Doctrine\ORM\Query\ResultSetMapping $resultSetMapping |
|
136 | 136 | * @param array $hints |
137 | 137 | * |
138 | 138 | * @return array |
@@ -105,6 +105,6 @@ |
||
105 | 105 | */ |
106 | 106 | public function valid() |
107 | 107 | { |
108 | - return ($this->_current!=false); |
|
108 | + return ($this->_current != false); |
|
109 | 109 | } |
110 | 110 | } |
@@ -715,9 +715,9 @@ |
||
715 | 715 | ); |
716 | 716 | } |
717 | 717 | |
718 | - /** |
|
719 | - * {@inheritdoc} |
|
720 | - */ |
|
718 | + /** |
|
719 | + * {@inheritdoc} |
|
720 | + */ |
|
721 | 721 | protected function getHash() |
722 | 722 | { |
723 | 723 | return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts. |
42 | 42 | */ |
43 | - const STATE_CLEAN = 1; |
|
43 | + const STATE_CLEAN = 1; |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * A query object is in state DIRTY when it has DQL parts that have not yet been |
@@ -707,11 +707,11 @@ discard block |
||
707 | 707 | ->getName(); |
708 | 708 | |
709 | 709 | return md5( |
710 | - $this->getDql() . serialize($this->_hints) . |
|
711 | - '&platform=' . $platform . |
|
712 | - ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : '') . |
|
713 | - '&firstResult=' . $this->_firstResult . '&maxResult=' . $this->_maxResults . |
|
714 | - '&hydrationMode=' . $this->_hydrationMode . '&types=' . serialize($this->_parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT' |
|
710 | + $this->getDql().serialize($this->_hints). |
|
711 | + '&platform='.$platform. |
|
712 | + ($this->_em->hasFilters() ? $this->_em->getFilters()->getHash() : ''). |
|
713 | + '&firstResult='.$this->_firstResult.'&maxResult='.$this->_maxResults. |
|
714 | + '&hydrationMode='.$this->_hydrationMode.'&types='.serialize($this->_parsedTypes).'DOCTRINE_QUERY_CACHE_SALT' |
|
715 | 715 | ); |
716 | 716 | } |
717 | 717 | |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | */ |
721 | 721 | protected function getHash() |
722 | 722 | { |
723 | - return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults); |
|
723 | + return sha1(parent::getHash().'-'.$this->_firstResult.'-'.$this->_maxResults); |
|
724 | 724 | } |
725 | 725 | |
726 | 726 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function referenceColumnName() |
102 | 102 | { |
103 | - return $this->case === CASE_UPPER ? 'ID' : 'id'; |
|
103 | + return $this->case === CASE_UPPER ? 'ID' : 'id'; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function joinColumnName($propertyName, $className = null) |
110 | 110 | { |
111 | - return $this->underscore($propertyName) . '_' . $this->referenceColumnName(); |
|
111 | + return $this->underscore($propertyName).'_'.$this->referenceColumnName(); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) |
118 | 118 | { |
119 | - return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity); |
|
119 | + return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function joinKeyColumnName($entityName, $referencedColumnName = null) |
126 | 126 | { |
127 | - return $this->classToTableName($entityName) . '_' . |
|
127 | + return $this->classToTableName($entityName).'_'. |
|
128 | 128 | ($referencedColumnName ?: $this->referenceColumnName()); |
129 | 129 | } |
130 | 130 |
@@ -91,6 +91,6 @@ |
||
91 | 91 | */ |
92 | 92 | public function getColumnAlias($columnName, $counter, AbstractPlatform $platform, ClassMetadata $class = null) |
93 | 93 | { |
94 | - return $platform->getSQLResultCasing($columnName . '_' . $counter); |
|
94 | + return $platform->getSQLResultCasing($columnName.'_'.$counter); |
|
95 | 95 | } |
96 | 96 | } |
@@ -707,13 +707,13 @@ |
||
707 | 707 | return $joinColumn; |
708 | 708 | } |
709 | 709 | |
710 | - /** |
|
711 | - * Parses the given field as array. |
|
712 | - * |
|
713 | - * @param SimpleXMLElement $fieldMapping |
|
714 | - * |
|
715 | - * @return array |
|
716 | - */ |
|
710 | + /** |
|
711 | + * Parses the given field as array. |
|
712 | + * |
|
713 | + * @param SimpleXMLElement $fieldMapping |
|
714 | + * |
|
715 | + * @return array |
|
716 | + */ |
|
717 | 717 | private function columnToArray(SimpleXMLElement $fieldMapping) |
718 | 718 | { |
719 | 719 | $mapping = array( |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | |
60 | 60 | if ($xmlRoot->getName() == 'entity') { |
61 | 61 | if (isset($xmlRoot['repository-class'])) { |
62 | - $metadata->setCustomRepositoryClass((string)$xmlRoot['repository-class']); |
|
62 | + $metadata->setCustomRepositoryClass((string) $xmlRoot['repository-class']); |
|
63 | 63 | } |
64 | 64 | if (isset($xmlRoot['read-only']) && $this->evaluateBoolean($xmlRoot['read-only'])) { |
65 | 65 | $metadata->markReadOnly(); |
66 | 66 | } |
67 | 67 | } else if ($xmlRoot->getName() == 'mapped-superclass') { |
68 | 68 | $metadata->setCustomRepositoryClass( |
69 | - isset($xmlRoot['repository-class']) ? (string)$xmlRoot['repository-class'] : null |
|
69 | + isset($xmlRoot['repository-class']) ? (string) $xmlRoot['repository-class'] : null |
|
70 | 70 | ); |
71 | 71 | $metadata->isMappedSuperclass = true; |
72 | 72 | } else if ($xmlRoot->getName() == 'embeddable') { |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | if (isset($xmlRoot->{'named-queries'})) { |
98 | 98 | foreach ($xmlRoot->{'named-queries'}->{'named-query'} as $namedQueryElement) { |
99 | 99 | $metadata->addNamedQuery(array( |
100 | - 'name' => (string)$namedQueryElement['name'], |
|
101 | - 'query' => (string)$namedQueryElement['query'] |
|
100 | + 'name' => (string) $namedQueryElement['name'], |
|
101 | + 'query' => (string) $namedQueryElement['query'] |
|
102 | 102 | )); |
103 | 103 | } |
104 | 104 | } |
@@ -107,10 +107,10 @@ discard block |
||
107 | 107 | if (isset($xmlRoot->{'named-native-queries'})) { |
108 | 108 | foreach ($xmlRoot->{'named-native-queries'}->{'named-native-query'} as $nativeQueryElement) { |
109 | 109 | $metadata->addNamedNativeQuery(array( |
110 | - 'name' => isset($nativeQueryElement['name']) ? (string)$nativeQueryElement['name'] : null, |
|
111 | - 'query' => isset($nativeQueryElement->query) ? (string)$nativeQueryElement->query : null, |
|
112 | - 'resultClass' => isset($nativeQueryElement['result-class']) ? (string)$nativeQueryElement['result-class'] : null, |
|
113 | - 'resultSetMapping' => isset($nativeQueryElement['result-set-mapping']) ? (string)$nativeQueryElement['result-set-mapping'] : null, |
|
110 | + 'name' => isset($nativeQueryElement['name']) ? (string) $nativeQueryElement['name'] : null, |
|
111 | + 'query' => isset($nativeQueryElement->query) ? (string) $nativeQueryElement->query : null, |
|
112 | + 'resultClass' => isset($nativeQueryElement['result-class']) ? (string) $nativeQueryElement['result-class'] : null, |
|
113 | + 'resultSetMapping' => isset($nativeQueryElement['result-set-mapping']) ? (string) $nativeQueryElement['result-set-mapping'] : null, |
|
114 | 114 | )); |
115 | 115 | } |
116 | 116 | } |
@@ -125,14 +125,14 @@ discard block |
||
125 | 125 | if (isset($entityElement['entity-class'])) { |
126 | 126 | $entityResult = array( |
127 | 127 | 'fields' => array(), |
128 | - 'entityClass' => (string)$entityElement['entity-class'], |
|
129 | - 'discriminatorColumn' => isset($entityElement['discriminator-column']) ? (string)$entityElement['discriminator-column'] : null, |
|
128 | + 'entityClass' => (string) $entityElement['entity-class'], |
|
129 | + 'discriminatorColumn' => isset($entityElement['discriminator-column']) ? (string) $entityElement['discriminator-column'] : null, |
|
130 | 130 | ); |
131 | 131 | |
132 | 132 | foreach ($entityElement as $fieldElement) { |
133 | 133 | $entityResult['fields'][] = array( |
134 | - 'name' => isset($fieldElement['name']) ? (string)$fieldElement['name'] : null, |
|
135 | - 'column' => isset($fieldElement['column']) ? (string)$fieldElement['column'] : null, |
|
134 | + 'name' => isset($fieldElement['name']) ? (string) $fieldElement['name'] : null, |
|
135 | + 'column' => isset($fieldElement['column']) ? (string) $fieldElement['column'] : null, |
|
136 | 136 | ); |
137 | 137 | } |
138 | 138 | |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | //<column-result/> |
143 | 143 | if (isset($entityElement['name'])) { |
144 | 144 | $columns[] = array( |
145 | - 'name' => (string)$entityElement['name'], |
|
145 | + 'name' => (string) $entityElement['name'], |
|
146 | 146 | ); |
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
150 | 150 | $metadata->addSqlResultSetMapping(array( |
151 | - 'name' => (string)$rsmElement['name'], |
|
151 | + 'name' => (string) $rsmElement['name'], |
|
152 | 152 | 'entities' => $entities, |
153 | 153 | 'columns' => $columns |
154 | 154 | )); |
@@ -156,18 +156,18 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | if (isset($xmlRoot['inheritance-type'])) { |
159 | - $inheritanceType = (string)$xmlRoot['inheritance-type']; |
|
160 | - $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceType)); |
|
159 | + $inheritanceType = (string) $xmlRoot['inheritance-type']; |
|
160 | + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_'.$inheritanceType)); |
|
161 | 161 | |
162 | 162 | if ($metadata->inheritanceType != \Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_NONE) { |
163 | 163 | // Evaluate <discriminator-column...> |
164 | 164 | if (isset($xmlRoot->{'discriminator-column'})) { |
165 | 165 | $discrColumn = $xmlRoot->{'discriminator-column'}; |
166 | 166 | $metadata->setDiscriminatorColumn(array( |
167 | - 'name' => isset($discrColumn['name']) ? (string)$discrColumn['name'] : null, |
|
168 | - 'type' => isset($discrColumn['type']) ? (string)$discrColumn['type'] : null, |
|
169 | - 'length' => isset($discrColumn['length']) ? (string)$discrColumn['length'] : null, |
|
170 | - 'columnDefinition' => isset($discrColumn['column-definition']) ? (string)$discrColumn['column-definition'] : null |
|
167 | + 'name' => isset($discrColumn['name']) ? (string) $discrColumn['name'] : null, |
|
168 | + 'type' => isset($discrColumn['type']) ? (string) $discrColumn['type'] : null, |
|
169 | + 'length' => isset($discrColumn['length']) ? (string) $discrColumn['length'] : null, |
|
170 | + 'columnDefinition' => isset($discrColumn['column-definition']) ? (string) $discrColumn['column-definition'] : null |
|
171 | 171 | )); |
172 | 172 | } else { |
173 | 173 | $metadata->setDiscriminatorColumn(array('name' => 'dtype', 'type' => 'string', 'length' => 255)); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | if (isset($xmlRoot->{'discriminator-map'})) { |
178 | 178 | $map = array(); |
179 | 179 | foreach ($xmlRoot->{'discriminator-map'}->{'discriminator-mapping'} as $discrMapElement) { |
180 | - $map[(string)$discrMapElement['value']] = (string)$discrMapElement['class']; |
|
180 | + $map[(string) $discrMapElement['value']] = (string) $discrMapElement['class']; |
|
181 | 181 | } |
182 | 182 | $metadata->setDiscriminatorMap($map); |
183 | 183 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | // Evaluate <change-tracking-policy...> |
189 | 189 | if (isset($xmlRoot['change-tracking-policy'])) { |
190 | 190 | $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' |
191 | - . strtoupper((string)$xmlRoot['change-tracking-policy']))); |
|
191 | + . strtoupper((string) $xmlRoot['change-tracking-policy']))); |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | // Evaluate <indexes...> |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | if (isset($uniqueXml['name'])) { |
228 | - $metadata->table['uniqueConstraints'][(string)$uniqueXml['name']] = $unique; |
|
228 | + $metadata->table['uniqueConstraints'][(string) $uniqueXml['name']] = $unique; |
|
229 | 229 | } else { |
230 | 230 | $metadata->table['uniqueConstraints'][] = $unique; |
231 | 231 | } |
@@ -285,29 +285,29 @@ discard block |
||
285 | 285 | $associationIds = array(); |
286 | 286 | foreach ($xmlRoot->id as $idElement) { |
287 | 287 | if (isset($idElement['association-key']) && $this->evaluateBoolean($idElement['association-key'])) { |
288 | - $associationIds[(string)$idElement['name']] = true; |
|
288 | + $associationIds[(string) $idElement['name']] = true; |
|
289 | 289 | continue; |
290 | 290 | } |
291 | 291 | |
292 | 292 | $mapping = array( |
293 | 293 | 'id' => true, |
294 | - 'fieldName' => (string)$idElement['name'] |
|
294 | + 'fieldName' => (string) $idElement['name'] |
|
295 | 295 | ); |
296 | 296 | |
297 | 297 | if (isset($idElement['type'])) { |
298 | - $mapping['type'] = (string)$idElement['type']; |
|
298 | + $mapping['type'] = (string) $idElement['type']; |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | if (isset($idElement['length'])) { |
302 | - $mapping['length'] = (string)$idElement['length']; |
|
302 | + $mapping['length'] = (string) $idElement['length']; |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | if (isset($idElement['column'])) { |
306 | - $mapping['columnName'] = (string)$idElement['column']; |
|
306 | + $mapping['columnName'] = (string) $idElement['column']; |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | if (isset($idElement['column-definition'])) { |
310 | - $mapping['columnDefinition'] = (string)$idElement['column-definition']; |
|
310 | + $mapping['columnDefinition'] = (string) $idElement['column-definition']; |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | if (isset($idElement->options)) { |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | if (isset($idElement->generator)) { |
320 | 320 | $strategy = isset($idElement->generator['strategy']) ? |
321 | - (string)$idElement->generator['strategy'] : 'AUTO'; |
|
321 | + (string) $idElement->generator['strategy'] : 'AUTO'; |
|
322 | 322 | $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' |
323 | 323 | . $strategy)); |
324 | 324 | } |
@@ -327,9 +327,9 @@ discard block |
||
327 | 327 | if (isset($idElement->{'sequence-generator'})) { |
328 | 328 | $seqGenerator = $idElement->{'sequence-generator'}; |
329 | 329 | $metadata->setSequenceGeneratorDefinition(array( |
330 | - 'sequenceName' => (string)$seqGenerator['sequence-name'], |
|
331 | - 'allocationSize' => (string)$seqGenerator['allocation-size'], |
|
332 | - 'initialValue' => (string)$seqGenerator['initial-value'] |
|
330 | + 'sequenceName' => (string) $seqGenerator['sequence-name'], |
|
331 | + 'allocationSize' => (string) $seqGenerator['allocation-size'], |
|
332 | + 'initialValue' => (string) $seqGenerator['initial-value'] |
|
333 | 333 | )); |
334 | 334 | } else if (isset($idElement->{'custom-id-generator'})) { |
335 | 335 | $customGenerator = $idElement->{'custom-id-generator'}; |
@@ -345,8 +345,8 @@ discard block |
||
345 | 345 | if (isset($xmlRoot->{'one-to-one'})) { |
346 | 346 | foreach ($xmlRoot->{'one-to-one'} as $oneToOneElement) { |
347 | 347 | $mapping = array( |
348 | - 'fieldName' => (string)$oneToOneElement['field'], |
|
349 | - 'targetEntity' => (string)$oneToOneElement['target-entity'] |
|
348 | + 'fieldName' => (string) $oneToOneElement['field'], |
|
349 | + 'targetEntity' => (string) $oneToOneElement['target-entity'] |
|
350 | 350 | ); |
351 | 351 | |
352 | 352 | if (isset($associationIds[$mapping['fieldName']])) { |
@@ -354,14 +354,14 @@ discard block |
||
354 | 354 | } |
355 | 355 | |
356 | 356 | if (isset($oneToOneElement['fetch'])) { |
357 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$oneToOneElement['fetch']); |
|
357 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToOneElement['fetch']); |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | if (isset($oneToOneElement['mapped-by'])) { |
361 | - $mapping['mappedBy'] = (string)$oneToOneElement['mapped-by']; |
|
361 | + $mapping['mappedBy'] = (string) $oneToOneElement['mapped-by']; |
|
362 | 362 | } else { |
363 | 363 | if (isset($oneToOneElement['inversed-by'])) { |
364 | - $mapping['inversedBy'] = (string)$oneToOneElement['inversed-by']; |
|
364 | + $mapping['inversedBy'] = (string) $oneToOneElement['inversed-by']; |
|
365 | 365 | } |
366 | 366 | $joinColumns = array(); |
367 | 367 | |
@@ -397,13 +397,13 @@ discard block |
||
397 | 397 | if (isset($xmlRoot->{'one-to-many'})) { |
398 | 398 | foreach ($xmlRoot->{'one-to-many'} as $oneToManyElement) { |
399 | 399 | $mapping = array( |
400 | - 'fieldName' => (string)$oneToManyElement['field'], |
|
401 | - 'targetEntity' => (string)$oneToManyElement['target-entity'], |
|
402 | - 'mappedBy' => (string)$oneToManyElement['mapped-by'] |
|
400 | + 'fieldName' => (string) $oneToManyElement['field'], |
|
401 | + 'targetEntity' => (string) $oneToManyElement['target-entity'], |
|
402 | + 'mappedBy' => (string) $oneToManyElement['mapped-by'] |
|
403 | 403 | ); |
404 | 404 | |
405 | 405 | if (isset($oneToManyElement['fetch'])) { |
406 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$oneToManyElement['fetch']); |
|
406 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $oneToManyElement['fetch']); |
|
407 | 407 | } |
408 | 408 | |
409 | 409 | if (isset($oneToManyElement->cascade)) { |
@@ -417,13 +417,13 @@ discard block |
||
417 | 417 | if (isset($oneToManyElement->{'order-by'})) { |
418 | 418 | $orderBy = array(); |
419 | 419 | foreach ($oneToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) { |
420 | - $orderBy[(string)$orderByField['name']] = (string)$orderByField['direction']; |
|
420 | + $orderBy[(string) $orderByField['name']] = (string) $orderByField['direction']; |
|
421 | 421 | } |
422 | 422 | $mapping['orderBy'] = $orderBy; |
423 | 423 | } |
424 | 424 | |
425 | 425 | if (isset($oneToManyElement['index-by'])) { |
426 | - $mapping['indexBy'] = (string)$oneToManyElement['index-by']; |
|
426 | + $mapping['indexBy'] = (string) $oneToManyElement['index-by']; |
|
427 | 427 | } else if (isset($oneToManyElement->{'index-by'})) { |
428 | 428 | throw new \InvalidArgumentException("<index-by /> is not a valid tag"); |
429 | 429 | } |
@@ -441,8 +441,8 @@ discard block |
||
441 | 441 | if (isset($xmlRoot->{'many-to-one'})) { |
442 | 442 | foreach ($xmlRoot->{'many-to-one'} as $manyToOneElement) { |
443 | 443 | $mapping = array( |
444 | - 'fieldName' => (string)$manyToOneElement['field'], |
|
445 | - 'targetEntity' => (string)$manyToOneElement['target-entity'] |
|
444 | + 'fieldName' => (string) $manyToOneElement['field'], |
|
445 | + 'targetEntity' => (string) $manyToOneElement['target-entity'] |
|
446 | 446 | ); |
447 | 447 | |
448 | 448 | if (isset($associationIds[$mapping['fieldName']])) { |
@@ -450,11 +450,11 @@ discard block |
||
450 | 450 | } |
451 | 451 | |
452 | 452 | if (isset($manyToOneElement['fetch'])) { |
453 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$manyToOneElement['fetch']); |
|
453 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToOneElement['fetch']); |
|
454 | 454 | } |
455 | 455 | |
456 | 456 | if (isset($manyToOneElement['inversed-by'])) { |
457 | - $mapping['inversedBy'] = (string)$manyToOneElement['inversed-by']; |
|
457 | + $mapping['inversedBy'] = (string) $manyToOneElement['inversed-by']; |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | $joinColumns = array(); |
@@ -486,12 +486,12 @@ discard block |
||
486 | 486 | if (isset($xmlRoot->{'many-to-many'})) { |
487 | 487 | foreach ($xmlRoot->{'many-to-many'} as $manyToManyElement) { |
488 | 488 | $mapping = array( |
489 | - 'fieldName' => (string)$manyToManyElement['field'], |
|
490 | - 'targetEntity' => (string)$manyToManyElement['target-entity'] |
|
489 | + 'fieldName' => (string) $manyToManyElement['field'], |
|
490 | + 'targetEntity' => (string) $manyToManyElement['target-entity'] |
|
491 | 491 | ); |
492 | 492 | |
493 | 493 | if (isset($manyToManyElement['fetch'])) { |
494 | - $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_' . (string)$manyToManyElement['fetch']); |
|
494 | + $mapping['fetch'] = constant('Doctrine\ORM\Mapping\ClassMetadata::FETCH_'.(string) $manyToManyElement['fetch']); |
|
495 | 495 | } |
496 | 496 | |
497 | 497 | if (isset($manyToManyElement['orphan-removal'])) { |
@@ -499,19 +499,19 @@ discard block |
||
499 | 499 | } |
500 | 500 | |
501 | 501 | if (isset($manyToManyElement['mapped-by'])) { |
502 | - $mapping['mappedBy'] = (string)$manyToManyElement['mapped-by']; |
|
502 | + $mapping['mappedBy'] = (string) $manyToManyElement['mapped-by']; |
|
503 | 503 | } else if (isset($manyToManyElement->{'join-table'})) { |
504 | 504 | if (isset($manyToManyElement['inversed-by'])) { |
505 | - $mapping['inversedBy'] = (string)$manyToManyElement['inversed-by']; |
|
505 | + $mapping['inversedBy'] = (string) $manyToManyElement['inversed-by']; |
|
506 | 506 | } |
507 | 507 | |
508 | 508 | $joinTableElement = $manyToManyElement->{'join-table'}; |
509 | 509 | $joinTable = array( |
510 | - 'name' => (string)$joinTableElement['name'] |
|
510 | + 'name' => (string) $joinTableElement['name'] |
|
511 | 511 | ); |
512 | 512 | |
513 | 513 | if (isset($joinTableElement['schema'])) { |
514 | - $joinTable['schema'] = (string)$joinTableElement['schema']; |
|
514 | + $joinTable['schema'] = (string) $joinTableElement['schema']; |
|
515 | 515 | } |
516 | 516 | |
517 | 517 | foreach ($joinTableElement->{'join-columns'}->{'join-column'} as $joinColumnElement) { |
@@ -532,13 +532,13 @@ discard block |
||
532 | 532 | if (isset($manyToManyElement->{'order-by'})) { |
533 | 533 | $orderBy = array(); |
534 | 534 | foreach ($manyToManyElement->{'order-by'}->{'order-by-field'} as $orderByField) { |
535 | - $orderBy[(string)$orderByField['name']] = (string)$orderByField['direction']; |
|
535 | + $orderBy[(string) $orderByField['name']] = (string) $orderByField['direction']; |
|
536 | 536 | } |
537 | 537 | $mapping['orderBy'] = $orderBy; |
538 | 538 | } |
539 | 539 | |
540 | 540 | if (isset($manyToManyElement['index-by'])) { |
541 | - $mapping['indexBy'] = (string)$manyToManyElement['index-by']; |
|
541 | + $mapping['indexBy'] = (string) $manyToManyElement['index-by']; |
|
542 | 542 | } else if (isset($manyToManyElement->{'index-by'})) { |
543 | 543 | throw new \InvalidArgumentException("<index-by /> is not a valid tag"); |
544 | 544 | } |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | // Evaluate <lifecycle-callbacks...> |
612 | 612 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
613 | 613 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
614 | - $metadata->addLifecycleCallback((string)$lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string)$lifecycleCallback['type'])); |
|
614 | + $metadata->addLifecycleCallback((string) $lifecycleCallback['method'], constant('Doctrine\ORM\Events::'.(string) $lifecycleCallback['type'])); |
|
615 | 615 | } |
616 | 616 | } |
617 | 617 | |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { |
621 | 621 | $className = (string) $listenerElement['class']; |
622 | 622 | // Evaluate the listener using naming convention. |
623 | - if($listenerElement->count() === 0) { |
|
623 | + if ($listenerElement->count() === 0) { |
|
624 | 624 | EntityListenerBuilder::bindEntityListener($metadata, $className); |
625 | 625 | |
626 | 626 | continue; |
@@ -678,8 +678,8 @@ discard block |
||
678 | 678 | private function joinColumnToArray(SimpleXMLElement $joinColumnElement) |
679 | 679 | { |
680 | 680 | $joinColumn = array( |
681 | - 'name' => (string)$joinColumnElement['name'], |
|
682 | - 'referencedColumnName' => (string)$joinColumnElement['referenced-column-name'] |
|
681 | + 'name' => (string) $joinColumnElement['name'], |
|
682 | + 'referencedColumnName' => (string) $joinColumnElement['referenced-column-name'] |
|
683 | 683 | ); |
684 | 684 | |
685 | 685 | if (isset($joinColumnElement['unique'])) { |
@@ -691,11 +691,11 @@ discard block |
||
691 | 691 | } |
692 | 692 | |
693 | 693 | if (isset($joinColumnElement['on-delete'])) { |
694 | - $joinColumn['onDelete'] = (string)$joinColumnElement['on-delete']; |
|
694 | + $joinColumn['onDelete'] = (string) $joinColumnElement['on-delete']; |
|
695 | 695 | } |
696 | 696 | |
697 | 697 | if (isset($joinColumnElement['column-definition'])) { |
698 | - $joinColumn['columnDefinition'] = (string)$joinColumnElement['column-definition']; |
|
698 | + $joinColumn['columnDefinition'] = (string) $joinColumnElement['column-definition']; |
|
699 | 699 | } |
700 | 700 | |
701 | 701 | return $joinColumn; |
@@ -769,12 +769,12 @@ discard block |
||
769 | 769 | $region = isset($cacheMapping['region']) ? (string) $cacheMapping['region'] : null; |
770 | 770 | $usage = isset($cacheMapping['usage']) ? strtoupper($cacheMapping['usage']) : null; |
771 | 771 | |
772 | - if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage)) { |
|
772 | + if ($usage && ! defined('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage)) { |
|
773 | 773 | throw new \InvalidArgumentException(sprintf('Invalid cache usage "%s"', $usage)); |
774 | 774 | } |
775 | 775 | |
776 | 776 | if ($usage) { |
777 | - $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_' . $usage); |
|
777 | + $usage = constant('Doctrine\ORM\Mapping\ClassMetadata::CACHE_USAGE_'.$usage); |
|
778 | 778 | } |
779 | 779 | |
780 | 780 | return array( |
@@ -815,12 +815,12 @@ discard block |
||
815 | 815 | |
816 | 816 | if (isset($xmlElement->entity)) { |
817 | 817 | foreach ($xmlElement->entity as $entityElement) { |
818 | - $entityName = (string)$entityElement['name']; |
|
818 | + $entityName = (string) $entityElement['name']; |
|
819 | 819 | $result[$entityName] = $entityElement; |
820 | 820 | } |
821 | 821 | } else if (isset($xmlElement->{'mapped-superclass'})) { |
822 | 822 | foreach ($xmlElement->{'mapped-superclass'} as $mappedSuperClass) { |
823 | - $className = (string)$mappedSuperClass['name']; |
|
823 | + $className = (string) $mappedSuperClass['name']; |
|
824 | 824 | $result[$className] = $mappedSuperClass; |
825 | 825 | } |
826 | 826 | } else if (isset($xmlElement->embeddable)) { |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | */ |
841 | 841 | protected function evaluateBoolean($element) |
842 | 842 | { |
843 | - $flag = (string)$element; |
|
843 | + $flag = (string) $element; |
|
844 | 844 | |
845 | 845 | return ($flag == "true" || $flag == "1"); |
846 | 846 | } |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | $tableName = $class->table['name']; |
50 | 50 | |
51 | 51 | if ( ! empty($class->table['schema'])) { |
52 | - $tableName = $class->table['schema'] . '.' . $class->table['name']; |
|
52 | + $tableName = $class->table['schema'].'.'.$class->table['name']; |
|
53 | 53 | |
54 | 54 | if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { |
55 | - $tableName = $class->table['schema'] . '__' . $class->table['name']; |
|
55 | + $tableName = $class->table['schema'].'__'.$class->table['name']; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $schema = ''; |
100 | 100 | |
101 | 101 | if (isset($association['joinTable']['schema'])) { |
102 | - $schema = $association['joinTable']['schema'] . '.'; |
|
102 | + $schema = $association['joinTable']['schema'].'.'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | $tableName = $association['joinTable']['name']; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $tableName = $platform->quoteIdentifier($tableName); |
109 | 109 | } |
110 | 110 | |
111 | - return $schema . $tableName; |
|
111 | + return $schema.$tableName; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | // Association defined as Id field |
129 | 129 | $joinColumns = $class->associationMappings[$fieldName]['joinColumns']; |
130 | 130 | $assocQuotedColumnNames = array_map( |
131 | - function ($joinColumn) use ($platform) |
|
131 | + function($joinColumn) use ($platform) |
|
132 | 132 | { |
133 | 133 | return isset($joinColumn['quoted']) |
134 | 134 | ? $platform->quoteIdentifier($joinColumn['name']) |
@@ -153,10 +153,10 @@ discard block |
||
153 | 153 | // If the alias is to long, characters are cut off from the beginning. |
154 | 154 | // 3 ) Strip non alphanumeric characters |
155 | 155 | // 4 ) Prefix with "_" if the result its numeric |
156 | - $columnName = $columnName . '_' . $counter; |
|
156 | + $columnName = $columnName.'_'.$counter; |
|
157 | 157 | $columnName = substr($columnName, -$platform->getMaxIdentifierLength()); |
158 | 158 | $columnName = preg_replace('/[^A-Za-z0-9_]/', '', $columnName); |
159 | - $columnName = is_numeric($columnName) ? '_' . $columnName : $columnName; |
|
159 | + $columnName = is_numeric($columnName) ? '_'.$columnName : $columnName; |
|
160 | 160 | |
161 | 161 | return $platform->getSQLResultCasing($columnName); |
162 | 162 | } |
@@ -155,9 +155,9 @@ |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | if ($property->isProtected()) { |
158 | - return "\0*\0" . $propertyName; |
|
158 | + return "\0*\0".$propertyName; |
|
159 | 159 | } |
160 | 160 | |
161 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $propertyName; |
|
161 | + return "\0".$property->getDeclaringClass()->getName()."\0".$propertyName; |
|
162 | 162 | } |
163 | 163 | } |
@@ -1431,7 +1431,7 @@ |
||
1431 | 1431 | |
1432 | 1432 | if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) { |
1433 | 1433 | if (isset($mapping['id']) && $mapping['id'] === true) { |
1434 | - throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1434 | + throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1435 | 1435 | } |
1436 | 1436 | |
1437 | 1437 | $mapping['requireSQLConversion'] = true; |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | /** |
668 | 668 | * Gets the ReflectionProperties of the mapped class. |
669 | 669 | * |
670 | - * @return array An array of ReflectionProperty instances. |
|
670 | + * @return \ReflectionProperty[] An array of ReflectionProperty instances. |
|
671 | 671 | */ |
672 | 672 | public function getReflectionProperties() |
673 | 673 | { |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | * - reflClass (ReflectionClass) |
805 | 805 | * - reflFields (ReflectionProperty array) |
806 | 806 | * |
807 | - * @return array The names of all the fields that should be serialized. |
|
807 | + * @return string[] The names of all the fields that should be serialized. |
|
808 | 808 | */ |
809 | 809 | public function __sleep() |
810 | 810 | { |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | /** |
905 | 905 | * Creates a new instance of the mapped class, without invoking the constructor. |
906 | 906 | * |
907 | - * @return object |
|
907 | + * @return ClassMetadata |
|
908 | 908 | */ |
909 | 909 | public function newInstance() |
910 | 910 | { |
@@ -1991,7 +1991,7 @@ discard block |
||
1991 | 1991 | * |
1992 | 1992 | * @param string $fieldName |
1993 | 1993 | * |
1994 | - * @return \Doctrine\DBAL\Types\Type|string|null |
|
1994 | + * @return string |
|
1995 | 1995 | */ |
1996 | 1996 | public function getTypeOfField($fieldName) |
1997 | 1997 | { |
@@ -2004,7 +2004,7 @@ discard block |
||
2004 | 2004 | * |
2005 | 2005 | * @param string $columnName |
2006 | 2006 | * |
2007 | - * @return \Doctrine\DBAL\Types\Type|string|null |
|
2007 | + * @return string |
|
2008 | 2008 | * |
2009 | 2009 | * @deprecated this method is bogous and unreliable, since it cannot resolve the type of a column that is |
2010 | 2010 | * derived by a referenced field on a different entity. |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | public function getSingleIdReflectionProperty() |
697 | 697 | { |
698 | 698 | if ($this->isIdentifierComposite) { |
699 | - throw new BadMethodCallException("Class " . $this->name . " has a composite identifier."); |
|
699 | + throw new BadMethodCallException("Class ".$this->name." has a composite identifier."); |
|
700 | 700 | } |
701 | 701 | return $this->reflFields[$this->identifier[0]]; |
702 | 702 | } |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | */ |
791 | 791 | public function __toString() |
792 | 792 | { |
793 | - return __CLASS__ . '@' . spl_object_hash($this); |
|
793 | + return __CLASS__.'@'.spl_object_hash($this); |
|
794 | 794 | } |
795 | 795 | |
796 | 796 | /** |
@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | public function validateAssociations() |
1025 | 1025 | { |
1026 | 1026 | foreach ($this->associationMappings as $mapping) { |
1027 | - if ( ! ClassLoader::classExists($mapping['targetEntity']) ) { |
|
1027 | + if ( ! ClassLoader::classExists($mapping['targetEntity'])) { |
|
1028 | 1028 | throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); |
1029 | 1029 | } |
1030 | 1030 | } |
@@ -1091,7 +1091,7 @@ discard block |
||
1091 | 1091 | } |
1092 | 1092 | |
1093 | 1093 | if ( ! isset($cache['region'])) { |
1094 | - $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; |
|
1094 | + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName; |
|
1095 | 1095 | } |
1096 | 1096 | |
1097 | 1097 | $this->associationMappings[$fieldName]['cache'] = $cache; |
@@ -1440,7 +1440,7 @@ discard block |
||
1440 | 1440 | $mapping['isOwningSide'] = true; // assume owning side until we hit mappedBy |
1441 | 1441 | |
1442 | 1442 | // unset optional indexBy attribute if its empty |
1443 | - if ( ! isset($mapping['indexBy']) || !$mapping['indexBy']) { |
|
1443 | + if ( ! isset($mapping['indexBy']) || ! $mapping['indexBy']) { |
|
1444 | 1444 | unset($mapping['indexBy']); |
1445 | 1445 | } |
1446 | 1446 | |
@@ -1453,7 +1453,7 @@ discard block |
||
1453 | 1453 | $mapping['targetEntity'] = ltrim($mapping['targetEntity'], '\\'); |
1454 | 1454 | } |
1455 | 1455 | |
1456 | - if ( ($mapping['type'] & self::MANY_TO_ONE) > 0 && |
|
1456 | + if (($mapping['type'] & self::MANY_TO_ONE) > 0 && |
|
1457 | 1457 | isset($mapping['orphanRemoval']) && |
1458 | 1458 | $mapping['orphanRemoval'] == true) { |
1459 | 1459 | |
@@ -1528,11 +1528,11 @@ discard block |
||
1528 | 1528 | } |
1529 | 1529 | |
1530 | 1530 | $mapping['cascade'] = $cascades; |
1531 | - $mapping['isCascadeRemove'] = in_array('remove', $cascades); |
|
1532 | - $mapping['isCascadePersist'] = in_array('persist', $cascades); |
|
1533 | - $mapping['isCascadeRefresh'] = in_array('refresh', $cascades); |
|
1534 | - $mapping['isCascadeMerge'] = in_array('merge', $cascades); |
|
1535 | - $mapping['isCascadeDetach'] = in_array('detach', $cascades); |
|
1531 | + $mapping['isCascadeRemove'] = in_array('remove', $cascades); |
|
1532 | + $mapping['isCascadePersist'] = in_array('persist', $cascades); |
|
1533 | + $mapping['isCascadeRefresh'] = in_array('refresh', $cascades); |
|
1534 | + $mapping['isCascadeMerge'] = in_array('merge', $cascades); |
|
1535 | + $mapping['isCascadeDetach'] = in_array('detach', $cascades); |
|
1536 | 1536 | |
1537 | 1537 | return $mapping; |
1538 | 1538 | } |
@@ -1618,7 +1618,7 @@ discard block |
||
1618 | 1618 | unset($mapping['unique']); |
1619 | 1619 | } |
1620 | 1620 | |
1621 | - if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
|
1621 | + if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) { |
|
1622 | 1622 | throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
1623 | 1623 | } |
1624 | 1624 | |
@@ -1675,7 +1675,7 @@ discard block |
||
1675 | 1675 | } |
1676 | 1676 | |
1677 | 1677 | $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
1678 | - && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1678 | + && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1679 | 1679 | |
1680 | 1680 | if ( ! isset($mapping['joinTable']['joinColumns'])) { |
1681 | 1681 | $mapping['joinTable']['joinColumns'] = array(array( |
@@ -1864,7 +1864,7 @@ discard block |
||
1864 | 1864 | |
1865 | 1865 | // Association defined as Id field |
1866 | 1866 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
1867 | - $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1867 | + $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1868 | 1868 | |
1869 | 1869 | $columnNames = array_merge($columnNames, $assocColumnNames); |
1870 | 1870 | } |
@@ -2042,7 +2042,7 @@ discard block |
||
2042 | 2042 | public function getTemporaryIdTableName() |
2043 | 2043 | { |
2044 | 2044 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
2045 | - return str_replace('.', '_', $this->getTableName() . '_id_tmp'); |
|
2045 | + return str_replace('.', '_', $this->getTableName().'_id_tmp'); |
|
2046 | 2046 | } |
2047 | 2047 | |
2048 | 2048 | /** |
@@ -2364,7 +2364,7 @@ discard block |
||
2364 | 2364 | */ |
2365 | 2365 | public function addNamedQuery(array $queryMapping) |
2366 | 2366 | { |
2367 | - if (!isset($queryMapping['name'])) { |
|
2367 | + if ( ! isset($queryMapping['name'])) { |
|
2368 | 2368 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2369 | 2369 | } |
2370 | 2370 | |
@@ -2372,7 +2372,7 @@ discard block |
||
2372 | 2372 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2373 | 2373 | } |
2374 | 2374 | |
2375 | - if (!isset($queryMapping['query'])) { |
|
2375 | + if ( ! isset($queryMapping['query'])) { |
|
2376 | 2376 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2377 | 2377 | } |
2378 | 2378 | |
@@ -2398,7 +2398,7 @@ discard block |
||
2398 | 2398 | */ |
2399 | 2399 | public function addNamedNativeQuery(array $queryMapping) |
2400 | 2400 | { |
2401 | - if (!isset($queryMapping['name'])) { |
|
2401 | + if ( ! isset($queryMapping['name'])) { |
|
2402 | 2402 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2403 | 2403 | } |
2404 | 2404 | |
@@ -2406,11 +2406,11 @@ discard block |
||
2406 | 2406 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2407 | 2407 | } |
2408 | 2408 | |
2409 | - if (!isset($queryMapping['query'])) { |
|
2409 | + if ( ! isset($queryMapping['query'])) { |
|
2410 | 2410 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2411 | 2411 | } |
2412 | 2412 | |
2413 | - if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) { |
|
2413 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
2414 | 2414 | throw MappingException::missingQueryMapping($this->name, $queryMapping['name']); |
2415 | 2415 | } |
2416 | 2416 | |
@@ -2442,7 +2442,7 @@ discard block |
||
2442 | 2442 | */ |
2443 | 2443 | public function addSqlResultSetMapping(array $resultMapping) |
2444 | 2444 | { |
2445 | - if (!isset($resultMapping['name'])) { |
|
2445 | + if ( ! isset($resultMapping['name'])) { |
|
2446 | 2446 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name); |
2447 | 2447 | } |
2448 | 2448 | |
@@ -2452,7 +2452,7 @@ discard block |
||
2452 | 2452 | |
2453 | 2453 | if (isset($resultMapping['entities'])) { |
2454 | 2454 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
2455 | - if (!isset($entityResult['entityClass'])) { |
|
2455 | + if ( ! isset($entityResult['entityClass'])) { |
|
2456 | 2456 | throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']); |
2457 | 2457 | } |
2458 | 2458 | |
@@ -2471,11 +2471,11 @@ discard block |
||
2471 | 2471 | |
2472 | 2472 | if (isset($entityResult['fields'])) { |
2473 | 2473 | foreach ($entityResult['fields'] as $k => $field) { |
2474 | - if (!isset($field['name'])) { |
|
2474 | + if ( ! isset($field['name'])) { |
|
2475 | 2475 | throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']); |
2476 | 2476 | } |
2477 | 2477 | |
2478 | - if (!isset($field['column'])) { |
|
2478 | + if ( ! isset($field['column'])) { |
|
2479 | 2479 | $fieldName = $field['name']; |
2480 | 2480 | if (strpos($fieldName, '.')) { |
2481 | 2481 | list(, $fieldName) = explode('.', $fieldName); |
@@ -2840,7 +2840,7 @@ discard block |
||
2840 | 2840 | return ( |
2841 | 2841 | isset($this->associationMappings[$fieldName]) && |
2842 | 2842 | isset($this->associationMappings[$fieldName]['joinColumns'][0]) && |
2843 | - !isset($this->associationMappings[$fieldName]['joinColumns'][1]) |
|
2843 | + ! isset($this->associationMappings[$fieldName]['joinColumns'][1]) |
|
2844 | 2844 | ); |
2845 | 2845 | } |
2846 | 2846 | |
@@ -2954,7 +2954,7 @@ discard block |
||
2954 | 2954 | } |
2955 | 2955 | |
2956 | 2956 | if ($definition['sequenceName'][0] == '`') { |
2957 | - $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
2957 | + $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
2958 | 2958 | $definition['quoted'] = true; |
2959 | 2959 | } |
2960 | 2960 | |
@@ -3046,7 +3046,7 @@ discard block |
||
3046 | 3046 | public function getAssociationTargetClass($assocName) |
3047 | 3047 | { |
3048 | 3048 | if ( ! isset($this->associationMappings[$assocName])) { |
3049 | - throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); |
|
3049 | + throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association."); |
|
3050 | 3050 | } |
3051 | 3051 | |
3052 | 3052 | return $this->associationMappings[$assocName]['targetEntity']; |
@@ -3085,7 +3085,7 @@ discard block |
||
3085 | 3085 | // Association defined as Id field |
3086 | 3086 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
3087 | 3087 | $assocQuotedColumnNames = array_map( |
3088 | - function ($joinColumn) use ($platform) { |
|
3088 | + function($joinColumn) use ($platform) { |
|
3089 | 3089 | return isset($joinColumn['quoted']) |
3090 | 3090 | ? $platform->quoteIdentifier($joinColumn['name']) |
3091 | 3091 | : $joinColumn['name']; |
@@ -3188,7 +3188,7 @@ discard block |
||
3188 | 3188 | } |
3189 | 3189 | |
3190 | 3190 | if ($className !== null && strpos($className, '\\') === false && strlen($this->namespace) > 0) { |
3191 | - return $this->namespace . '\\' . $className; |
|
3191 | + return $this->namespace.'\\'.$className; |
|
3192 | 3192 | } |
3193 | 3193 | |
3194 | 3194 | return $className; |
@@ -3240,15 +3240,15 @@ discard block |
||
3240 | 3240 | ? $fieldMapping['originalClass'] |
3241 | 3241 | : $embeddable->name; |
3242 | 3242 | $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) |
3243 | - ? $property . '.' . $fieldMapping['declaredField'] |
|
3243 | + ? $property.'.'.$fieldMapping['declaredField'] |
|
3244 | 3244 | : $property; |
3245 | 3245 | $fieldMapping['originalField'] = isset($fieldMapping['originalField']) |
3246 | 3246 | ? $fieldMapping['originalField'] |
3247 | 3247 | : $fieldMapping['fieldName']; |
3248 | - $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName']; |
|
3248 | + $fieldMapping['fieldName'] = $property.".".$fieldMapping['fieldName']; |
|
3249 | 3249 | |
3250 | - if (! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3251 | - $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName']; |
|
3250 | + if ( ! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3251 | + $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'].$fieldMapping['columnName']; |
|
3252 | 3252 | } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) { |
3253 | 3253 | $fieldMapping['columnName'] = $this->namingStrategy |
3254 | 3254 | ->embeddedFieldToColumnName( |
@@ -3290,7 +3290,7 @@ discard block |
||
3290 | 3290 | $sequencePrefix = $this->getSequencePrefix($platform); |
3291 | 3291 | |
3292 | 3292 | $columnName = $this->getSingleIdentifierColumnName(); |
3293 | - $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; |
|
3293 | + $sequenceName = $sequencePrefix.'_'.$columnName.'_seq'; |
|
3294 | 3294 | |
3295 | 3295 | return $sequenceName; |
3296 | 3296 | } |
@@ -3310,10 +3310,10 @@ discard block |
||
3310 | 3310 | |
3311 | 3311 | // Prepend the schema name to the table name if there is one |
3312 | 3312 | if ($schemaName = $this->getSchemaName()) { |
3313 | - $sequencePrefix = $schemaName . '.' . $tableName; |
|
3313 | + $sequencePrefix = $schemaName.'.'.$tableName; |
|
3314 | 3314 | |
3315 | 3315 | if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { |
3316 | - $sequencePrefix = $schemaName . '__' . $tableName; |
|
3316 | + $sequencePrefix = $schemaName.'__'.$tableName; |
|
3317 | 3317 | } |
3318 | 3318 | } |
3319 | 3319 |