@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function exportClassMetadata(ClassMetadataInfo $metadata) |
43 | 43 | { |
44 | - $xml = new SimpleXmlElement('<?xml version="1.0" encoding="utf-8"?><doctrine-mapping ' . |
|
45 | - 'xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" ' . |
|
46 | - 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' . |
|
44 | + $xml = new SimpleXmlElement('<?xml version="1.0" encoding="utf-8"?><doctrine-mapping '. |
|
45 | + 'xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" '. |
|
46 | + 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '. |
|
47 | 47 | 'xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd" />'); |
48 | 48 | |
49 | 49 | if ($metadata->isMappedSuperclass) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $trackingPolicy = $this->_getChangeTrackingPolicyString($metadata->changeTrackingPolicy); |
100 | 100 | |
101 | - if ( $trackingPolicy != 'DEFERRED_IMPLICIT') { |
|
101 | + if ($trackingPolicy != 'DEFERRED_IMPLICIT') { |
|
102 | 102 | $root->addChild('change-tracking-policy', $trackingPolicy); |
103 | 103 | } |
104 | 104 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } |
298 | 298 | |
299 | 299 | if (count($cascade) === 5) { |
300 | - $cascade = ['cascade-all']; |
|
300 | + $cascade = ['cascade-all']; |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | if ($cascade) { |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | } |
380 | 380 | } |
381 | 381 | |
382 | - if (isset($metadata->lifecycleCallbacks) && count($metadata->lifecycleCallbacks)>0) { |
|
382 | + if (isset($metadata->lifecycleCallbacks) && count($metadata->lifecycleCallbacks) > 0) { |
|
383 | 383 | $lifecycleCallbacksXml = $root->addChild('lifecycle-callbacks'); |
384 | 384 | |
385 | 385 | foreach ($metadata->lifecycleCallbacks as $name => $methods) { |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | { |
431 | 431 | $sequenceDefinition = $metadata->sequenceGeneratorDefinition; |
432 | 432 | |
433 | - if (! ($metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE && $sequenceDefinition)) { |
|
433 | + if ( ! ($metadata->generatorType === ClassMetadataInfo::GENERATOR_TYPE_SEQUENCE && $sequenceDefinition)) { |
|
434 | 434 | return; |
435 | 435 | } |
436 | 436 |
@@ -242,17 +242,17 @@ |
||
242 | 242 | public function getUnitOfWork(); |
243 | 243 | |
244 | 244 | /** |
245 | - * Gets a hydrator for the given hydration mode. |
|
246 | - * |
|
247 | - * This method caches the hydrator instances which is used for all queries that don't |
|
248 | - * selectively iterate over the result. |
|
249 | - * |
|
250 | - * @deprecated |
|
251 | - * |
|
252 | - * @param string|int $hydrationMode |
|
253 | - * |
|
254 | - * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator |
|
255 | - */ |
|
245 | + * Gets a hydrator for the given hydration mode. |
|
246 | + * |
|
247 | + * This method caches the hydrator instances which is used for all queries that don't |
|
248 | + * selectively iterate over the result. |
|
249 | + * |
|
250 | + * @deprecated |
|
251 | + * |
|
252 | + * @param string|int $hydrationMode |
|
253 | + * |
|
254 | + * @return \Doctrine\ORM\Internal\Hydration\AbstractHydrator |
|
255 | + */ |
|
256 | 256 | public function getHydrator($hydrationMode); |
257 | 257 | |
258 | 258 | /** |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | public function getParameter($key) |
324 | 324 | { |
325 | 325 | $filteredParameters = $this->parameters->filter( |
326 | - function (Query\Parameter $parameter) use ($key) : bool { |
|
326 | + function(Query\Parameter $parameter) use ($key) : bool { |
|
327 | 327 | $parameterName = $parameter->getName(); |
328 | 328 | |
329 | 329 | return $key === $parameterName || (string) $key === (string) $parameterName; |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | return $value->name; |
417 | 417 | } |
418 | 418 | |
419 | - if (! is_object($value)) { |
|
419 | + if ( ! is_object($value)) { |
|
420 | 420 | return $value; |
421 | 421 | } |
422 | 422 | |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | */ |
470 | 470 | private function translateNamespaces(Query\ResultSetMapping $rsm) |
471 | 471 | { |
472 | - $translate = function ($alias) { |
|
472 | + $translate = function($alias) { |
|
473 | 473 | return $this->_em->getClassMetadata($alias)->getName(); |
474 | 474 | }; |
475 | 475 | |
@@ -999,7 +999,7 @@ discard block |
||
999 | 999 | $this->getTimestampKey() |
1000 | 1000 | ); |
1001 | 1001 | |
1002 | - $result = $queryCache->get($queryKey, $rsm, $this->_hints); |
|
1002 | + $result = $queryCache->get($queryKey, $rsm, $this->_hints); |
|
1003 | 1003 | |
1004 | 1004 | if ($result !== null) { |
1005 | 1005 | if ($this->cacheLogger) { |
@@ -1135,6 +1135,6 @@ discard block |
||
1135 | 1135 | |
1136 | 1136 | ksort($hints); |
1137 | 1137 | |
1138 | - return sha1($query . '-' . serialize($params) . '-' . serialize($hints)); |
|
1138 | + return sha1($query.'-'.serialize($params).'-'.serialize($hints)); |
|
1139 | 1139 | } |
1140 | 1140 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $targetEntity = current( |
226 | 226 | array_filter( |
227 | 227 | $classes, |
228 | - function (ClassMetadata $class) use ($idMapping) : bool { |
|
228 | + function(ClassMetadata $class) use ($idMapping) : bool { |
|
229 | 229 | return $class->name === $idMapping['targetEntity']; |
230 | 230 | } |
231 | 231 | ) |
@@ -645,8 +645,8 @@ discard block |
||
645 | 645 | |
646 | 646 | if ( ! $definingClass) { |
647 | 647 | throw new \Doctrine\ORM\ORMException( |
648 | - 'Column name `' . $joinColumn['referencedColumnName'] . '` referenced for relation from ' |
|
649 | - . $mapping['sourceEntity'] . ' towards ' . $mapping['targetEntity'] . ' does not exist.' |
|
648 | + 'Column name `'.$joinColumn['referencedColumnName'].'` referenced for relation from ' |
|
649 | + . $mapping['sourceEntity'].' towards '.$mapping['targetEntity'].' does not exist.' |
|
650 | 650 | ); |
651 | 651 | } |
652 | 652 | |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | */ |
742 | 742 | private function gatherColumnOptions(array $mapping) : array |
743 | 743 | { |
744 | - if (! isset($mapping['options'])) { |
|
744 | + if ( ! isset($mapping['options'])) { |
|
745 | 745 | return []; |
746 | 746 | } |
747 | 747 | |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | if ($table->hasPrimaryKey()) { |
848 | 848 | $columns = $table->getPrimaryKey()->getColumns(); |
849 | 849 | if (count($columns) == 1) { |
850 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
850 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
851 | 851 | if ($fullSchema->hasSequence($checkSequence)) { |
852 | 852 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
853 | 853 | } |