Passed
Pull Request — master (#7782)
by Gabriel
06:00
created
lib/Doctrine/ORM/Mapping/Factory/DefaultNamingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Factory/Strategy/ConditionalFileWriterClassMetadataGeneratorStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/UnderscoreNamingStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/ClassMetadataDefinitionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
     ) : Mapping\ComponentMetadata {
144 144
         $this->reverseEngineerMappingFromDatabase();
145 145
 
146
-        if (! isset($this->classToTableNames[$className])) {
147
-            throw new InvalidArgumentException('Unknown class ' . $className);
146
+        if ( ! isset($this->classToTableNames[$className])) {
147
+            throw new InvalidArgumentException('Unknown class '.$className);
148 148
         }
149 149
 
150 150
         $metadata = new Mapping\ClassMetadata($className, $parent, $metadataBuildingContext);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     }
174 174
                 }
175 175
 
176
-                if (! $otherFk) {
176
+                if ( ! $otherFk) {
177 177
                     // the definition of this many to many table does not contain
178 178
                     // enough foreign key information to continue reverse engineering.
179 179
                     continue;
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
                 $allForeignKeyColumns = array_merge($allForeignKeyColumns, $foreignKey->getLocalColumns());
257 257
             }
258 258
 
259
-            if (! $table->hasPrimaryKey()) {
259
+            if ( ! $table->hasPrimaryKey()) {
260 260
                 throw new Mapping\MappingException(
261
-                    'Table ' . $table->getName() . ' has no primary key. Doctrine does not ' .
261
+                    'Table '.$table->getName().' has no primary key. Doctrine does not '.
262 262
                     "support reverse engineering from tables that don't have a primary key."
263 263
                 );
264 264
             }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
             }
449 449
 
450 450
             // Here we need to check if $fkColumns are the same as $primaryKeys
451
-            if (! array_diff($fkColumns, $primaryKeys)) {
451
+            if ( ! array_diff($fkColumns, $primaryKeys)) {
452 452
                 $metadata->addProperty($associationMapping);
453 453
             } else {
454 454
                 $metadata->addProperty($associationMapping);
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
      */
494 494
     private function getClassNameForTable($tableName)
495 495
     {
496
-        return $this->namespace . (
496
+        return $this->namespace.(
497 497
             $this->classNamesForTables[$tableName]
498 498
                 ?? Inflector::classify(strtolower($tableName))
499 499
         );
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Mapping/NamingStrategy/JoinColumnClassNamingStrategy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
tests/Doctrine/Performance/EntityManagerFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $config = new Configuration();
27 27
 
28
-        $config->setProxyDir(__DIR__ . '/../Tests/Proxies');
28
+        $config->setProxyDir(__DIR__.'/../Tests/Proxies');
29 29
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
30 30
         $config->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_EVAL);
31 31
         $config->setMetadataDriverImpl(
32 32
             $config->newDefaultAnnotationDriver([
33
-                realpath(__DIR__ . '/Models/Cache'),
34
-                realpath(__DIR__ . '/Models/GeoNames'),
33
+                realpath(__DIR__.'/Models/Cache'),
34
+                realpath(__DIR__.'/Models/GeoNames'),
35 35
             ])
36 36
         );
37 37
 
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $config = new Configuration();
55 55
 
56
-        $config->setProxyDir(__DIR__ . '/../Tests/Proxies');
56
+        $config->setProxyDir(__DIR__.'/../Tests/Proxies');
57 57
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
58 58
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
59 59
         $config->setMetadataDriverImpl(
60 60
             $config->newDefaultAnnotationDriver(
61 61
                 [
62
-                    realpath(__DIR__ . '/Models/Cache'),
63
-                    realpath(__DIR__ . '/Models/Generic'),
64
-                    realpath(__DIR__ . '/Models/GeoNames'),
62
+                    realpath(__DIR__.'/Models/Cache'),
63
+                    realpath(__DIR__.'/Models/Generic'),
64
+                    realpath(__DIR__.'/Models/GeoNames'),
65 65
                 ]
66 66
             )
67 67
         );
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/StaticClassMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     protected function getReflectionService() : ReflectionService
20 20
     {
21
-        if (! $this->reflectionService) {
21
+        if ( ! $this->reflectionService) {
22 22
             $this->reflectionService = new StaticReflectionService();
23 23
         }
24 24
 
Please login to merge, or discard this patch.