@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function getClassShortName(string $className) : string |
31 | 31 | { |
32 | 32 | if (strpos($className, '\\') !== false) { |
33 | - $className = substr($className, strrpos($className, '\\')+1); |
|
33 | + $className = substr($className, strrpos($className, '\\') + 1); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | return $className; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $namespace = ''; |
45 | 45 | |
46 | 46 | if (strpos($className, '\\') !== false) { |
47 | - $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\')+1)); |
|
47 | + $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\') + 1)); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return $namespace; |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | // Check query cache. |
234 | 234 | $queryCache = $this->getQueryCacheDriver(); |
235 | - if (! ($this->useQueryCache && $queryCache)) { |
|
235 | + if ( ! ($this->useQueryCache && $queryCache)) { |
|
236 | 236 | $parser = new Parser($this); |
237 | 237 | |
238 | 238 | $this->parserResult = $parser->parse(); |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | foreach ($this->parameters as $parameter) { |
368 | 368 | $key = $parameter->getName(); |
369 | 369 | |
370 | - if (! isset($paramMappings[$key])) { |
|
370 | + if ( ! isset($paramMappings[$key])) { |
|
371 | 371 | throw QueryException::unknownParameter($key); |
372 | 372 | } |
373 | 373 | |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | public function setLockMode($lockMode) |
697 | 697 | { |
698 | 698 | if (in_array($lockMode, [LockMode::NONE, LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE], true)) { |
699 | - if (! $this->em->getConnection()->isTransactionActive()) { |
|
699 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
700 | 700 | throw TransactionRequiredException::transactionRequired(); |
701 | 701 | } |
702 | 702 | } |
@@ -737,11 +737,11 @@ discard block |
||
737 | 737 | ->getName(); |
738 | 738 | |
739 | 739 | return md5( |
740 | - $this->getDQL() . serialize($this->hints) . |
|
741 | - '&platform=' . $platform . |
|
742 | - ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : '') . |
|
743 | - '&firstResult=' . $this->firstResult . '&maxResult=' . $this->maxResults . |
|
744 | - '&hydrationMode=' . $this->hydrationMode . '&types=' . serialize($this->parsedTypes) . 'DOCTRINE_QUERY_CACHE_SALT' |
|
740 | + $this->getDQL().serialize($this->hints). |
|
741 | + '&platform='.$platform. |
|
742 | + ($this->em->hasFilters() ? $this->em->getFilters()->getHash() : ''). |
|
743 | + '&firstResult='.$this->firstResult.'&maxResult='.$this->maxResults. |
|
744 | + '&hydrationMode='.$this->hydrationMode.'&types='.serialize($this->parsedTypes).'DOCTRINE_QUERY_CACHE_SALT' |
|
745 | 745 | ); |
746 | 746 | } |
747 | 747 | |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | */ |
751 | 751 | protected function getHash() |
752 | 752 | { |
753 | - return sha1(parent::getHash() . '-' . $this->firstResult . '-' . $this->maxResults); |
|
753 | + return sha1(parent::getHash().'-'.$this->firstResult.'-'.$this->maxResults); |
|
754 | 754 | } |
755 | 755 | |
756 | 756 | /** |
@@ -160,7 +160,7 @@ |
||
160 | 160 | ?ClassMetadata $parent, |
161 | 161 | ClassMetadataBuildingContext $metadataBuildingContext |
162 | 162 | ) : ClassMetadataDefinition { |
163 | - if (! isset($this->definitions[$className])) { |
|
163 | + if ( ! isset($this->definitions[$className])) { |
|
164 | 164 | $this->definitions[$className] = $this->definitionFactory->build($className, $parent, $metadataBuildingContext); |
165 | 165 | } |
166 | 166 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ?string $className = null, |
44 | 44 | ?string $embeddedClassName = null |
45 | 45 | ) : string { |
46 | - return $propertyName . '_' . $embeddedColumnName; |
|
46 | + return $propertyName.'_'.$embeddedColumnName; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function joinColumnName(string $propertyName, ?string $className = null) : string |
61 | 61 | { |
62 | - return $propertyName . '_' . $this->referenceColumnName(); |
|
62 | + return $propertyName.'_'.$this->referenceColumnName(); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function joinTableName(string $sourceEntity, string $targetEntity, ?string $propertyName = null) : string |
69 | 69 | { |
70 | - return strtolower($this->classToTableName($sourceEntity) . '_' . |
|
70 | + return strtolower($this->classToTableName($sourceEntity).'_'. |
|
71 | 71 | $this->classToTableName($targetEntity)); |
72 | 72 | } |
73 | 73 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function joinKeyColumnName(string $entityName, ?string $referencedColumnName = null) : string |
78 | 78 | { |
79 | 79 | return strtolower( |
80 | - $this->classToTableName($entityName) . '_' . ($referencedColumnName ?: $this->referenceColumnName()) |
|
80 | + $this->classToTableName($entityName).'_'.($referencedColumnName ?: $this->referenceColumnName()) |
|
81 | 81 | ); |
82 | 82 | } |
83 | 83 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | ClassMetadataDefinition $definition, |
19 | 19 | ClassMetadataBuildingContext $metadataBuildingContext |
20 | 20 | ) : void { |
21 | - if (! file_exists($filePath)) { |
|
21 | + if ( ! file_exists($filePath)) { |
|
22 | 22 | parent::generate($filePath, $definition, $metadataBuildingContext); |
23 | 23 | |
24 | 24 | return; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | ?string $className = null, |
81 | 81 | ?string $embeddedClassName = null |
82 | 82 | ) : string { |
83 | - return $this->underscore($propertyName) . '_' . $embeddedColumnName; |
|
83 | + return $this->underscore($propertyName).'_'.$embeddedColumnName; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function joinColumnName(string $propertyName, ?string $className = null) : string |
98 | 98 | { |
99 | - return $this->underscore($propertyName) . '_' . $this->referenceColumnName(); |
|
99 | + return $this->underscore($propertyName).'_'.$this->referenceColumnName(); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function joinTableName(string $sourceEntity, string $targetEntity, ?string $propertyName = null) : string |
106 | 106 | { |
107 | - return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity); |
|
107 | + return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function joinKeyColumnName(string $entityName, ?string $referencedColumnName = null) : string |
114 | 114 | { |
115 | - return $this->classToTableName($entityName) . '_' . |
|
115 | + return $this->classToTableName($entityName).'_'. |
|
116 | 116 | ($referencedColumnName ?: $this->referenceColumnName()); |
117 | 117 | } |
118 | 118 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | ) : ClassMetadataDefinition { |
31 | 31 | $definition = $this->createDefinition($className, $parentMetadata); |
32 | 32 | |
33 | - if (! class_exists($definition->metadataClassName, false)) { |
|
33 | + if ( ! class_exists($definition->metadataClassName, false)) { |
|
34 | 34 | $metadataClassPath = $this->resolver->resolveMetadataClassPath($className); |
35 | 35 | |
36 | 36 | $this->generatorStrategy->generate($metadataClassPath, $definition, $metadataBuildingContext); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | public function joinColumnName(string $propertyName, ?string $className = null) : string |
19 | 19 | { |
20 | 20 | return strtolower($this->classToTableName($className)) |
21 | - . '_' . $propertyName |
|
22 | - . '_' . $this->referenceColumnName(); |
|
21 | + . '_'.$propertyName |
|
22 | + . '_'.$this->referenceColumnName(); |
|
23 | 23 | } |
24 | 24 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $driver = new DatabaseDriver($sm); |
62 | 62 | |
63 | 63 | foreach ($driver->getAllClassNames() as $className) { |
64 | - if (! in_array(strtolower($className), $classNames, true)) { |
|
64 | + if ( ! in_array(strtolower($className), $classNames, true)) { |
|
65 | 65 | continue; |
66 | 66 | } |
67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | if (count($metadataList) !== count($classNames)) { |
74 | - $this->fail("Have not found all classes matching the names '" . implode(', ', $classNames) . "' only tables " . implode(', ', array_keys($metadataList))); |
|
74 | + $this->fail("Have not found all classes matching the names '".implode(', ', $classNames)."' only tables ".implode(', ', array_keys($metadataList))); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | return $metadataList; |