Passed
Pull Request — master (#7448)
by Ilya
14:31
created
tests/Doctrine/Tests/ORM/Functional/Ticket/GH7286Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $query = $this->em->createQuery(
41 41
             'SELECT CONCAT(e.type, MIN(e.version)) pair'
42
-            . ' FROM ' . GH7286Entity::class . ' e'
42
+            . ' FROM '.GH7286Entity::class.' e'
43 43
             . ' WHERE e.type IS NOT NULL'
44 44
             . ' GROUP BY e.type'
45 45
             . ' ORDER BY e.type'
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $query = $this->em->createQuery(
65 65
             'SELECT CC(e.type, MIN(e.version)) pair'
66
-            . ' FROM ' . GH7286Entity::class . ' e'
66
+            . ' FROM '.GH7286Entity::class.' e'
67 67
             . ' WHERE e.type IS NOT NULL AND e.type != :type'
68 68
             . ' GROUP BY e.type'
69 69
         );
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Proxy/Factory/StaticProxyFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function generateProxyClasses(array $classes) : int
58 58
     {
59
-        $concreteClasses = array_filter($classes, static function (ClassMetadata $metadata) : bool {
59
+        $concreteClasses = array_filter($classes, static function(ClassMetadata $metadata) : bool {
60 60
             return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract());
61 61
         });
62 62
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 ->proxyFactory
66 66
                 ->createProxy(
67 67
                     $metadata->getClassName(),
68
-                    static function () {
68
+                    static function() {
69 69
                         // empty closure, serves its purpose, for now
70 70
                     },
71 71
                     $this->skippedFieldsFqns($metadata)
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 ->getUnitOfWork()
90 90
                 ->getEntityPersister($metadata->getClassName());
91 91
 
92
-        $proxyInstance                                            = $this
92
+        $proxyInstance = $this
93 93
             ->proxyFactory
94 94
             ->createProxy(
95 95
                 $metadata->getClassName(),
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : Closure
110 110
     {
111
-        return static function (
111
+        return static function(
112 112
             GhostObjectInterface $ghostObject,
113 113
             string $method,
114 114
             // we don't care
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $identifier = $persister->getIdentifier($ghostObject);
127 127
 
128 128
             // @TODO how do we use `$properties` in the persister? That would be a massive optimisation
129
-            if (! $persister->loadById($identifier, $ghostObject)) {
129
+            if ( ! $persister->loadById($identifier, $ghostObject)) {
130 130
                 $initializer = $originalInitializer;
131 131
 
132 132
                 throw EntityNotFoundException::fromClassNameAndIdentifier(
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         $transientFieldsFqns = [];
159 159
 
160 160
         foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) {
161
-            if (! $property instanceof TransientMetadata) {
161
+            if ( ! $property instanceof TransientMetadata) {
162 162
                 continue;
163 163
             }
164 164
 
@@ -196,11 +196,11 @@  discard block
 block discarded – undo
196 196
     private function propertyFqcn(ReflectionProperty $property) : string
197 197
     {
198 198
         if ($property->isPrivate()) {
199
-            return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName();
199
+            return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName();
200 200
         }
201 201
 
202 202
         if ($property->isProtected()) {
203
-            return "\0*\0" . $property->getName();
203
+            return "\0*\0".$property->getName();
204 204
         }
205 205
 
206 206
         return $property->getName();
Please login to merge, or discard this patch.
lib/Doctrine/ORM/AbstractQuery.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     public function getParameter($key)
301 301
     {
302 302
         $filteredParameters = $this->parameters->filter(
303
-            static function (Query\Parameter $parameter) use ($key) : bool {
303
+            static function(Query\Parameter $parameter) use ($key) : bool {
304 304
                 $parameterName = $parameter->getName();
305 305
 
306 306
                 return $key === $parameterName || (string) $key === (string) $parameterName;
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
             return null;
717 717
         }
718 718
 
719
-        if (! is_array($result)) {
719
+        if ( ! is_array($result)) {
720 720
             return $result;
721 721
         }
722 722
 
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
             throw new NoResultException();
751 751
         }
752 752
 
753
-        if (! is_array($result)) {
753
+        if ( ! is_array($result)) {
754 754
             return $result;
755 755
         }
756 756
 
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
             $this->setHydrationMode($hydrationMode);
841 841
         }
842 842
 
843
-        if (! empty($parameters)) {
843
+        if ( ! empty($parameters)) {
844 844
             $this->setParameters($parameters);
845 845
         }
846 846
 
@@ -879,11 +879,11 @@  discard block
 block discarded – undo
879 879
             $this->setHydrationMode($hydrationMode);
880 880
         }
881 881
 
882
-        if (! empty($parameters)) {
882
+        if ( ! empty($parameters)) {
883 883
             $this->setParameters($parameters);
884 884
         }
885 885
 
886
-        $setCacheEntry = static function () {
886
+        $setCacheEntry = static function() {
887 887
         };
888 888
 
889 889
         if ($this->hydrationCacheProfile !== null) {
@@ -897,11 +897,11 @@  discard block
 block discarded – undo
897 897
                 return $result[$realCacheKey];
898 898
             }
899 899
 
900
-            if (! $result) {
900
+            if ( ! $result) {
901 901
                 $result = [];
902 902
             }
903 903
 
904
-            $setCacheEntry = static function ($data) use ($cache, $result, $cacheKey, $realCacheKey, $queryCacheProfile) {
904
+            $setCacheEntry = static function($data) use ($cache, $result, $cacheKey, $realCacheKey, $queryCacheProfile) {
905 905
                 $result[$realCacheKey] = $data;
906 906
 
907 907
                 $cache->save($cacheKey, $result, $queryCacheProfile->getLifetime());
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
     {
1064 1064
         $query  = $this->getSQL();
1065 1065
         $hints  = $this->getHints();
1066
-        $params = array_map(function (Parameter $parameter) {
1066
+        $params = array_map(function(Parameter $parameter) {
1067 1067
             $value = $parameter->getValue();
1068 1068
 
1069 1069
             // Small optimization
@@ -1077,6 +1077,6 @@  discard block
 block discarded – undo
1077 1077
 
1078 1078
         ksort($hints);
1079 1079
 
1080
-        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
1080
+        return sha1($query.'-'.serialize($params).'-'.serialize($hints));
1081 1081
     }
1082 1082
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/ORMInvalidArgumentException.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public static function scheduleInsertForManagedEntity($entity)
32 32
     {
33
-        return new self('A managed+dirty entity ' . self::objToStr($entity) . ' can not be scheduled for insertion.');
33
+        return new self('A managed+dirty entity '.self::objToStr($entity).' can not be scheduled for insertion.');
34 34
     }
35 35
 
36 36
     /**
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public static function scheduleInsertForRemovedEntity($entity)
42 42
     {
43
-        return new self('Removed entity ' . self::objToStr($entity) . ' can not be scheduled for insertion.');
43
+        return new self('Removed entity '.self::objToStr($entity).' can not be scheduled for insertion.');
44 44
     }
45 45
 
46 46
     /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public static function scheduleInsertTwice($entity)
52 52
     {
53
-        return new self('Entity ' . self::objToStr($entity) . ' can not be scheduled for insertion twice.');
53
+        return new self('Entity '.self::objToStr($entity).' can not be scheduled for insertion twice.');
54 54
     }
55 55
 
56 56
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public static function entityWithoutIdentity($className, $entity)
63 63
     {
64 64
         return new self(
65
-            "The given entity of type '" . $className . "' (" . self::objToStr($entity) . ') has no identity/no ' .
65
+            "The given entity of type '".$className."' (".self::objToStr($entity).') has no identity/no '.
66 66
             'id values set. It cannot be added to the identity map.'
67 67
         );
68 68
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public static function readOnlyRequiresManagedEntity($entity)
76 76
     {
77
-        return new self('Only managed entities can be marked or checked as read only. But ' . self::objToStr($entity) . ' is not');
77
+        return new self('Only managed entities can be marked or checked as read only. But '.self::objToStr($entity).' is not');
78 78
     }
79 79
 
80 80
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     public static function newEntitiesFoundThroughRelationships($newEntitiesWithAssociations)
86 86
     {
87 87
         $errorMessages = array_map(
88
-            static function (array $newEntityWithAssociation) : string {
88
+            static function(array $newEntityWithAssociation) : string {
89 89
                 [$associationMetadata, $entity] = $newEntityWithAssociation;
90 90
 
91 91
                 return self::newEntityFoundThroughRelationshipMessage($associationMetadata, $entity);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public static function entityNotManaged($entity)
156 156
     {
157
-        return new self('Entity ' . self::objToStr($entity) . ' is not managed. An entity is managed if its fetched ' .
157
+        return new self('Entity '.self::objToStr($entity).' is not managed. An entity is managed if its fetched '.
158 158
             'from the database or registered as new through EntityManager#persist');
159 159
     }
160 160
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public static function entityHasNoIdentity($entity, $operation)
168 168
     {
169
-        return new self('Entity has no identity, therefore ' . $operation . ' cannot be performed. ' . self::objToStr($entity));
169
+        return new self('Entity has no identity, therefore '.$operation.' cannot be performed. '.self::objToStr($entity));
170 170
     }
171 171
 
172 172
     /**
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      */
178 178
     public static function entityIsRemoved($entity, $operation)
179 179
     {
180
-        return new self('Entity is removed, therefore ' . $operation . ' cannot be performed. ' . self::objToStr($entity));
180
+        return new self('Entity is removed, therefore '.$operation.' cannot be performed. '.self::objToStr($entity));
181 181
     }
182 182
 
183 183
     /**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     public static function detachedEntityCannot($entity, $operation)
190 190
     {
191
-        return new self('Detached entity ' . self::objToStr($entity) . ' cannot be ' . $operation);
191
+        return new self('Detached entity '.self::objToStr($entity).' cannot be '.$operation);
192 192
     }
193 193
 
194 194
     /**
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public static function invalidObject($context, $given, $parameterIndex = 1)
202 202
     {
203
-        return new self($context . ' expects parameter ' . $parameterIndex .
204
-            ' to be an entity object, ' . gettype($given) . ' given.');
203
+        return new self($context.' expects parameter '.$parameterIndex.
204
+            ' to be an entity object, '.gettype($given).' given.');
205 205
     }
206 206
 
207 207
     /**
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public static function invalidCompositeIdentifier()
211 211
     {
212
-        return new self('Binding an entity with a composite primary key to a query is not supported. ' .
212
+        return new self('Binding an entity with a composite primary key to a query is not supported. '.
213 213
             'You should split the parameter into the explicit fields and bind them separately.');
214 214
     }
215 215
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
      */
247 247
     private static function objToStr($obj) : string
248 248
     {
249
-        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj);
249
+        return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj);
250 250
     }
251 251
 
252 252
     /**
@@ -255,15 +255,15 @@  discard block
 block discarded – undo
255 255
     private static function newEntityFoundThroughRelationshipMessage(AssociationMetadata $association, $entity) : string
256 256
     {
257 257
         return 'A new entity was found through the relationship \''
258
-            . $association->getSourceEntity() . '#' . $association->getName() . '\' that was not'
259
-            . ' configured to cascade persist operations for entity: ' . self::objToStr($entity) . '.'
258
+            . $association->getSourceEntity().'#'.$association->getName().'\' that was not'
259
+            . ' configured to cascade persist operations for entity: '.self::objToStr($entity).'.'
260 260
             . ' To solve this issue: Either explicitly call EntityManager#persist()'
261 261
             . ' on this unknown entity or configure cascade persist'
262 262
             . ' this association in the mapping for example @ManyToOne(..,cascade={"persist"}).'
263 263
             . (method_exists($entity, '__toString')
264 264
                 ? ''
265 265
                 : ' If you cannot find out which entity causes the problem implement \''
266
-                . $association->getTargetEntity() . '#__toString()\' to get a clue.'
266
+                . $association->getTargetEntity().'#__toString()\' to get a clue.'
267 267
             );
268 268
     }
269 269
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/Autoloader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         // remove namespace separators from remaining class name
47 47
         $fileName = str_replace('\\', '', $classNameRelativeToMetadataNamespace);
48 48
 
49
-        return $metadataDir . DIRECTORY_SEPARATOR . $fileName . '.php';
49
+        return $metadataDir.DIRECTORY_SEPARATOR.$fileName.'.php';
50 50
     }
51 51
 
52 52
     /**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     ) : Closure {
64 64
         $metadataNamespace = ltrim($metadataNamespace, '\\');
65 65
 
66
-        if (! ($notFoundCallback === null || is_callable($notFoundCallback))) {
66
+        if ( ! ($notFoundCallback === null || is_callable($notFoundCallback))) {
67 67
             $type = is_object($notFoundCallback) ? get_class($notFoundCallback) : gettype($notFoundCallback);
68 68
 
69 69
             throw new InvalidArgumentException(
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             );
72 72
         }
73 73
 
74
-        $autoloader = static function ($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) {
74
+        $autoloader = static function($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) {
75 75
             if (strpos($className, $metadataNamespace) === 0) {
76 76
                 $file = Autoloader::resolveFile($metadataDir, $metadataNamespace, $className);
77 77
 
Please login to merge, or discard this patch.
ORM/Mapping/Factory/Strategy/FileWriterClassMetadataGeneratorStrategy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $this->ensureDirectoryIsReady(dirname($filePath));
38 38
 
39
-        $tmpFileName = $filePath . '.' . uniqid('', true);
39
+        $tmpFileName = $filePath.'.'.uniqid('', true);
40 40
 
41 41
         file_put_contents($tmpFileName, $sourceCode);
42 42
         @chmod($tmpFileName, 0664);
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
      */
51 51
     private function ensureDirectoryIsReady(string $directory)
52 52
     {
53
-        if (! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
53
+        if ( ! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
54 54
             throw new RuntimeException(sprintf('Your metadata directory "%s" must be writable', $directory));
55 55
         }
56 56
 
57
-        if (! is_writable($directory)) {
57
+        if ( ! is_writable($directory)) {
58 58
             throw new RuntimeException(sprintf('Your proxy directory "%s" must be writable', $directory));
59 59
         }
60 60
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function register($object)
44 44
     {
45
-        if (! is_object($object)) {
45
+        if ( ! is_object($object)) {
46 46
             throw new InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object)));
47 47
         }
48 48
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/VariableExporter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,30 +24,30 @@
 block discarded – undo
24 24
      */
25 25
     public function export($value, int $indentationLevel = 0) : string
26 26
     {
27
-        if (! is_array($value)) {
27
+        if ( ! is_array($value)) {
28 28
             return var_export($value, true);
29 29
         }
30 30
 
31 31
         $indentation  = str_repeat(self::INDENTATION, $indentationLevel);
32
-        $longestKey   = array_reduce(array_keys($value), static function ($k, $v) {
32
+        $longestKey   = array_reduce(array_keys($value), static function($k, $v) {
33 33
             return (string) (strlen((string) $k) > strlen((string) $v) ? $k : $v);
34 34
         });
35 35
         $maxKeyLength = strlen($longestKey) + (is_numeric($longestKey) ? 0 : 2);
36 36
 
37 37
         $lines = [];
38 38
 
39
-        $lines[] = $indentation . '[';
39
+        $lines[] = $indentation.'[';
40 40
 
41 41
         foreach ($value as $entryKey => $entryValue) {
42 42
             $lines[] = sprintf(
43 43
                 '%s%s => %s,',
44
-                $indentation . self::INDENTATION,
44
+                $indentation.self::INDENTATION,
45 45
                 str_pad(var_export($entryKey, true), $maxKeyLength),
46 46
                 ltrim($this->export($entryValue, $indentationLevel + 1))
47 47
             );
48 48
         }
49 49
 
50
-        $lines[] = $indentation . ']';
50
+        $lines[] = $indentation.']';
51 51
 
52 52
         return implode(PHP_EOL, $lines);
53 53
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/Annotation/AnnotationDriver.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             return $this->classNames;
208 208
         }
209 209
 
210
-        if (! $this->paths) {
210
+        if ( ! $this->paths) {
211 211
             throw Mapping\MappingException::pathRequired();
212 212
         }
213 213
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $includedFiles = [];
216 216
 
217 217
         foreach ($this->paths as $path) {
218
-            if (! is_dir($path)) {
218
+            if ( ! is_dir($path)) {
219 219
                 throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
220 220
             }
221 221
 
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
                     new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
225 225
                     RecursiveIteratorIterator::LEAVES_ONLY
226 226
                 ),
227
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
227
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
228 228
                 RecursiveRegexIterator::GET_MATCH
229 229
             );
230 230
 
231 231
             foreach ($iterator as $file) {
232 232
                 $sourceFile = $file[0];
233 233
 
234
-                if (! preg_match('(^phar:)i', $sourceFile)) {
234
+                if ( ! preg_match('(^phar:)i', $sourceFile)) {
235 235
                     $sourceFile = realpath($sourceFile);
236 236
                 }
237 237
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
     ) : Mapping\ClassMetadata {
280 280
         $reflectionClass = $metadata->getReflectionClass();
281 281
 
282
-        if (! $reflectionClass) {
282
+        if ( ! $reflectionClass) {
283 283
             // this happens when running annotation driver in combination with
284 284
             // static reflection services. This is not the nicest fix
285 285
             $reflectionClass = new ReflectionClass($metadata->getClassName());
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
                 $metadataBuildingContext
317 317
             );
318 318
 
319
-            if (! $property) {
319
+            if ( ! $property) {
320 320
                 continue;
321 321
             }
322 322
 
@@ -613,11 +613,11 @@  discard block
 block discarded – undo
613 613
         $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval);
614 614
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch));
615 615
 
616
-        if (! empty($oneToOneAnnot->mappedBy)) {
616
+        if ( ! empty($oneToOneAnnot->mappedBy)) {
617 617
             $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy);
618 618
         }
619 619
 
620
-        if (! empty($oneToOneAnnot->inversedBy)) {
620
+        if ( ! empty($oneToOneAnnot->inversedBy)) {
621 621
             $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy);
622 622
         }
623 623
 
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
         $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade));
676 676
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch));
677 677
 
678
-        if (! empty($manyToOneAnnot->inversedBy)) {
678
+        if ( ! empty($manyToOneAnnot->inversedBy)) {
679 679
             $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy);
680 680
         }
681 681
 
@@ -734,11 +734,11 @@  discard block
 block discarded – undo
734 734
         $assocMetadata->setOrphanRemoval($oneToManyAnnot->orphanRemoval);
735 735
         $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToManyAnnot->fetch));
736 736
 
737
-        if (! empty($oneToManyAnnot->mappedBy)) {
737
+        if ( ! empty($oneToManyAnnot->mappedBy)) {
738 738
             $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy);
739 739
         }
740 740
 
741
-        if (! empty($oneToManyAnnot->indexBy)) {
741
+        if ( ! empty($oneToManyAnnot->indexBy)) {
742 742
             $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy);
743 743
         }
744 744
 
@@ -781,15 +781,15 @@  discard block
 block discarded – undo
781 781
         $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval);
782 782
         $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch));
783 783
 
784
-        if (! empty($manyToManyAnnot->mappedBy)) {
784
+        if ( ! empty($manyToManyAnnot->mappedBy)) {
785 785
             $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy);
786 786
         }
787 787
 
788
-        if (! empty($manyToManyAnnot->inversedBy)) {
788
+        if ( ! empty($manyToManyAnnot->inversedBy)) {
789 789
             $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy);
790 790
         }
791 791
 
792
-        if (! empty($manyToManyAnnot->indexBy)) {
792
+        if ( ! empty($manyToManyAnnot->indexBy)) {
793 793
             $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy);
794 794
         }
795 795
 
@@ -832,15 +832,15 @@  discard block
 block discarded – undo
832 832
 
833 833
         $fieldMetadata->setType(Type::getType($columnAnnot->type));
834 834
 
835
-        if (! empty($columnAnnot->name)) {
835
+        if ( ! empty($columnAnnot->name)) {
836 836
             $fieldMetadata->setColumnName($columnAnnot->name);
837 837
         }
838 838
 
839
-        if (! empty($columnAnnot->columnDefinition)) {
839
+        if ( ! empty($columnAnnot->columnDefinition)) {
840 840
             $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition);
841 841
         }
842 842
 
843
-        if (! empty($columnAnnot->length)) {
843
+        if ( ! empty($columnAnnot->length)) {
844 844
             $fieldMetadata->setLength($columnAnnot->length);
845 845
         }
846 846
 
@@ -863,11 +863,11 @@  discard block
 block discarded – undo
863 863
         Annotation\Table $tableAnnot,
864 864
         Mapping\TableMetadata $table
865 865
     ) : Mapping\TableMetadata {
866
-        if (! empty($tableAnnot->name)) {
866
+        if ( ! empty($tableAnnot->name)) {
867 867
             $table->setName($tableAnnot->name);
868 868
         }
869 869
 
870
-        if (! empty($tableAnnot->schema)) {
870
+        if ( ! empty($tableAnnot->schema)) {
871 871
             $table->setSchema($tableAnnot->schema);
872 872
         }
873 873
 
@@ -905,11 +905,11 @@  discard block
 block discarded – undo
905 905
     ) : Mapping\JoinTableMetadata {
906 906
         $joinTable = new Mapping\JoinTableMetadata();
907 907
 
908
-        if (! empty($joinTableAnnot->name)) {
908
+        if ( ! empty($joinTableAnnot->name)) {
909 909
             $joinTable->setName($joinTableAnnot->name);
910 910
         }
911 911
 
912
-        if (! empty($joinTableAnnot->schema)) {
912
+        if ( ! empty($joinTableAnnot->schema)) {
913 913
             $joinTable->setSchema($joinTableAnnot->schema);
914 914
         }
915 915
 
@@ -937,22 +937,22 @@  discard block
 block discarded – undo
937 937
         $joinColumn = new Mapping\JoinColumnMetadata();
938 938
 
939 939
         // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers
940
-        if (! empty($joinColumnAnnot->name)) {
940
+        if ( ! empty($joinColumnAnnot->name)) {
941 941
             $joinColumn->setColumnName($joinColumnAnnot->name);
942 942
         }
943 943
 
944
-        if (! empty($joinColumnAnnot->referencedColumnName)) {
944
+        if ( ! empty($joinColumnAnnot->referencedColumnName)) {
945 945
             $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName);
946 946
         }
947 947
 
948 948
         $joinColumn->setNullable($joinColumnAnnot->nullable);
949 949
         $joinColumn->setUnique($joinColumnAnnot->unique);
950 950
 
951
-        if (! empty($joinColumnAnnot->fieldName)) {
951
+        if ( ! empty($joinColumnAnnot->fieldName)) {
952 952
             $joinColumn->setAliasedName($joinColumnAnnot->fieldName);
953 953
         }
954 954
 
955
-        if (! empty($joinColumnAnnot->columnDefinition)) {
955
+        if ( ! empty($joinColumnAnnot->columnDefinition)) {
956 956
             $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition);
957 957
         }
958 958
 
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
         $fieldName = null
975 975
     ) : Mapping\CacheMetadata {
976 976
         $baseRegion    = strtolower(str_replace('\\', '_', $metadata->getRootClassName()));
977
-        $defaultRegion = $baseRegion . ($fieldName ? '__' . $fieldName : '');
977
+        $defaultRegion = $baseRegion.($fieldName ? '__'.$fieldName : '');
978 978
 
979 979
         $usage  = constant(sprintf('%s::%s', Mapping\CacheUsage::class, $cacheAnnot->usage));
980 980
         $region = $cacheAnnot->region ?: $defaultRegion;
@@ -1043,11 +1043,11 @@  discard block
 block discarded – undo
1043 1043
             $discriminatorColumn->setType(Type::getType($typeName));
1044 1044
             $discriminatorColumn->setColumnName($discriminatorColumnAnnotation->name);
1045 1045
 
1046
-            if (! empty($discriminatorColumnAnnotation->columnDefinition)) {
1046
+            if ( ! empty($discriminatorColumnAnnotation->columnDefinition)) {
1047 1047
                 $discriminatorColumn->setColumnDefinition($discriminatorColumnAnnotation->columnDefinition);
1048 1048
             }
1049 1049
 
1050
-            if (! empty($discriminatorColumnAnnotation->length)) {
1050
+            if ( ! empty($discriminatorColumnAnnotation->length)) {
1051 1051
                 $discriminatorColumn->setLength($discriminatorColumnAnnotation->length);
1052 1052
             }
1053 1053
         }
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
             $entityListenersAnnot = $classAnnotations[Annotation\EntityListeners::class];
1100 1100
 
1101 1101
             foreach ($entityListenersAnnot->value as $listenerClassName) {
1102
-                if (! class_exists($listenerClassName)) {
1102
+                if ( ! class_exists($listenerClassName)) {
1103 1103
                     throw Mapping\MappingException::entityListenerClassNotFound(
1104 1104
                         $listenerClassName,
1105 1105
                         $metadata->getClassName()
@@ -1137,7 +1137,7 @@  discard block
 block discarded – undo
1137 1137
                 $fieldName = $associationOverride->name;
1138 1138
                 $property  = $metadata->getProperty($fieldName);
1139 1139
 
1140
-                if (! $property) {
1140
+                if ( ! $property) {
1141 1141
                     throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName);
1142 1142
                 }
1143 1143
 
@@ -1171,7 +1171,7 @@  discard block
 block discarded – undo
1171 1171
                 // Check for fetch
1172 1172
                 if ($associationOverride->fetch) {
1173 1173
                     $override->setFetchMode(
1174
-                        constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch)
1174
+                        constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch)
1175 1175
                     );
1176 1176
                 }
1177 1177
 
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
     {
1261 1261
         $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode);
1262 1262
 
1263
-        if (! defined($fetchModeConstant)) {
1263
+        if ( ! defined($fetchModeConstant)) {
1264 1264
             throw Mapping\MappingException::invalidFetchMode($className, $fetchMode);
1265 1265
         }
1266 1266
 
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
         $classAnnotations = $this->reader->getClassAnnotations($reflectionClass);
1307 1307
 
1308 1308
         foreach ($classAnnotations as $key => $annot) {
1309
-            if (! is_numeric($key)) {
1309
+            if ( ! is_numeric($key)) {
1310 1310
                 continue;
1311 1311
             }
1312 1312
 
@@ -1324,7 +1324,7 @@  discard block
 block discarded – undo
1324 1324
         $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty);
1325 1325
 
1326 1326
         foreach ($propertyAnnotations as $key => $annot) {
1327
-            if (! is_numeric($key)) {
1327
+            if ( ! is_numeric($key)) {
1328 1328
                 continue;
1329 1329
             }
1330 1330
 
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
         $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod);
1343 1343
 
1344 1344
         foreach ($methodAnnotations as $key => $annot) {
1345
-            if (! is_numeric($key)) {
1345
+            if ( ! is_numeric($key)) {
1346 1346
                 continue;
1347 1347
             }
1348 1348
 
Please login to merge, or discard this patch.