Completed
Push — master ( e6a79e...1760b4 )
by Marco
19:16
created
lib/Doctrine/ORM/Mapping/Exporter/AssociationMetadataExporter.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -24,33 +24,33 @@
 block discarded – undo
24 24
         $cacheExporter    = new CacheMetadataExporter();
25 25
         $variableExporter = new VariableExporter();
26 26
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
27
-        $objectReference  = $indentation . static::VARIABLE;
27
+        $objectReference  = $indentation.static::VARIABLE;
28 28
         $cascade          = $this->resolveCascade($value->getCascade());
29 29
         $lines            = [];
30 30
 
31
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
31
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
32 32
 
33
-        if (! empty($value->getCache())) {
33
+        if ( ! empty($value->getCache())) {
34 34
             $lines[] = $cacheExporter->export($value->getCache(), $indentationLevel);
35 35
             $lines[] = null;
36
-            $lines[] = $objectReference . '->setCache(' . $cacheExporter::VARIABLE . ');';
36
+            $lines[] = $objectReference.'->setCache('.$cacheExporter::VARIABLE.');';
37 37
         }
38 38
 
39
-        if (! empty($value->getMappedBy())) {
40
-            $lines[] = $objectReference . '->setMappedBy("' . $value->getMappedBy() . '");';
41
-            $lines[] = $objectReference . '->setOwningSide(false);';
39
+        if ( ! empty($value->getMappedBy())) {
40
+            $lines[] = $objectReference.'->setMappedBy("'.$value->getMappedBy().'");';
41
+            $lines[] = $objectReference.'->setOwningSide(false);';
42 42
         }
43 43
 
44
-        if (! empty($value->getInversedBy())) {
45
-            $lines[] = $objectReference . '->setInversedBy("' . $value->getInversedBy() . '");';
44
+        if ( ! empty($value->getInversedBy())) {
45
+            $lines[] = $objectReference.'->setInversedBy("'.$value->getInversedBy().'");';
46 46
         }
47 47
 
48
-        $lines[] = $objectReference . '->setSourceEntity("' . $value->getSourceEntity() . '");';
49
-        $lines[] = $objectReference . '->setTargetEntity("' . $value->getTargetEntity() . '");';
50
-        $lines[] = $objectReference . '->setFetchMode(Mapping\FetchMode::' . strtoupper($value->getFetchMode()) . '");';
51
-        $lines[] = $objectReference . '->setCascade(' . $variableExporter->export($cascade, $indentationLevel + 1) . ');';
52
-        $lines[] = $objectReference . '->setOrphanRemoval(' . $variableExporter->export($value->isOrphanRemoval(), $indentationLevel + 1) . ');';
53
-        $lines[] = $objectReference . '->setPrimaryKey(' . $variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1) . ');';
48
+        $lines[] = $objectReference.'->setSourceEntity("'.$value->getSourceEntity().'");';
49
+        $lines[] = $objectReference.'->setTargetEntity("'.$value->getTargetEntity().'");';
50
+        $lines[] = $objectReference.'->setFetchMode(Mapping\FetchMode::'.strtoupper($value->getFetchMode()).'");';
51
+        $lines[] = $objectReference.'->setCascade('.$variableExporter->export($cascade, $indentationLevel + 1).');';
52
+        $lines[] = $objectReference.'->setOrphanRemoval('.$variableExporter->export($value->isOrphanRemoval(), $indentationLevel + 1).');';
53
+        $lines[] = $objectReference.'->setPrimaryKey('.$variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1).');';
54 54
 
55 55
         return implode(PHP_EOL, $lines);
56 56
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/TableMetadata.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function getQuotedQualifiedName(AbstractPlatform $platform) : string
57 57
     {
58
-        if (! $this->schema) {
58
+        if ( ! $this->schema) {
59 59
             return $platform->quoteIdentifier($this->name);
60 60
         }
61 61
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function addIndex(array $index) : void
129 129
     {
130
-        if (! isset($index['name'])) {
130
+        if ( ! isset($index['name'])) {
131 131
             $this->indexes[] = $index;
132 132
 
133 133
             return;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function addUniqueConstraint(array $constraint) : void
164 164
     {
165
-        if (! isset($constraint['name'])) {
165
+        if ( ! isset($constraint['name'])) {
166 166
             $this->uniqueConstraints[] = $constraint;
167 167
 
168 168
             return;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/AbstractClassMetadataFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function getAllMetadata() : array
126 126
     {
127
-        if (! $this->initialized) {
127
+        if ( ! $this->initialized) {
128 128
             $this->initialize();
129 129
         }
130 130
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         try {
167 167
             if ($this->cacheDriver) {
168
-                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);
168
+                $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt);
169 169
 
170 170
                 if ($cached instanceof ClassMetadata) {
171 171
                     $this->loadedMetadata[$realClassName] = $cached;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                     foreach ($this->loadMetadata($realClassName, $metadataBuildingContext) as $loadedClass) {
176 176
                         $loadedClassName = $loadedClass->getClassName();
177 177
 
178
-                        $this->cacheDriver->save($loadedClassName . $this->cacheSalt, $loadedClass, null);
178
+                        $this->cacheDriver->save($loadedClassName.$this->cacheSalt, $loadedClass, null);
179 179
                     }
180 180
                 }
181 181
             } else {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         } catch (CommonMappingException $loadingException) {
185 185
             $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext);
186 186
 
187
-            if (! $fallbackMetadataResponse) {
187
+            if ( ! $fallbackMetadataResponse) {
188 188
                 throw $loadingException;
189 189
             }
190 190
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      */
221 221
     protected function loadMetadata(string $name, ClassMetadataBuildingContext $metadataBuildingContext) : array
222 222
     {
223
-        if (! $this->initialized) {
223
+        if ( ! $this->initialized) {
224 224
             $this->initialize();
225 225
         }
226 226
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
      */
257 257
     public function isTransient($className) : bool
258 258
     {
259
-        if (! $this->initialized) {
259
+        if ( ! $this->initialized) {
260 260
             $this->initialize();
261 261
         }
262 262
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $parentClasses = [];
279 279
 
280 280
         foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) {
281
-            if (! $this->getDriver()->isTransient($parentClass)) {
281
+            if ( ! $this->getDriver()->isTransient($parentClass)) {
282 282
                 $parentClasses[] = $parentClass;
283 283
             }
284 284
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exception/UnknownGeneratorType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
 {
11 11
     public static function create(string $generatorType) : self
12 12
     {
13
-        return new self('Unknown generator type: ' . $generatorType);
13
+        return new self('Unknown generator type: '.$generatorType);
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ToManyAssociationMetadata.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         }
59 59
 
60 60
         // If $value is not a Collection then use an ArrayCollection.
61
-        if (! $collection instanceof Collection) {
61
+        if ( ! $collection instanceof Collection) {
62 62
             // @todo guilhermeblanco Conceptually, support to custom collections by replacing ArrayCollection creation.
63 63
             $collection = new ArrayCollection((array) $collection);
64 64
         }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $collection  = new PersistentCollection($entityManager, $targetClass, $collection);
69 69
 
70 70
         $collection->setOwner($owner, $this);
71
-        $collection->setDirty(! $collection->isEmpty());
71
+        $collection->setDirty( ! $collection->isEmpty());
72 72
         $collection->setInitialized(true);
73 73
 
74 74
         return $collection;
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
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public function generate(string $filePath, ClassMetadataDefinition $definition) : void
16 16
     {
17
-        if (! file_exists($filePath)) {
17
+        if ( ! file_exists($filePath)) {
18 18
             parent::generate($filePath, $definition);
19 19
 
20 20
             return;
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
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
         $this->ensureDirectoryIsReady(dirname($filePath));
37 37
 
38
-        $tmpFileName = $filePath . '.' . uniqid('', true);
38
+        $tmpFileName = $filePath.'.'.uniqid('', true);
39 39
 
40 40
         file_put_contents($tmpFileName, $sourceCode);
41 41
         @chmod($tmpFileName, 0664);
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
      */
50 50
     private function ensureDirectoryIsReady(string $directory)
51 51
     {
52
-        if (! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
52
+        if ( ! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
53 53
             throw new \RuntimeException(sprintf('Your metadata directory "%s" must be writable', $directory));
54 54
         }
55 55
 
56
-        if (! is_writable($directory)) {
56
+        if ( ! is_writable($directory)) {
57 57
             throw new \RuntimeException(sprintf('Your proxy directory "%s" must be writable', $directory));
58 58
         }
59 59
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/RuntimeClassMetadataFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     protected function getReflectionService() : RuntimeReflectionService
19 19
     {
20
-        if (! $this->reflectionService) {
20
+        if ( ! $this->reflectionService) {
21 21
             $this->reflectionService = new RuntimeReflectionService();
22 22
         }
23 23
 
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
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null)
78 78
     {
79
-        return $this->underscore($propertyName) . '_' . $embeddedColumnName;
79
+        return $this->underscore($propertyName).'_'.$embeddedColumnName;
80 80
     }
81 81
 
82 82
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function joinColumnName($propertyName, $className = null)
94 94
     {
95
-        return $this->underscore($propertyName) . '_' . $this->referenceColumnName();
95
+        return $this->underscore($propertyName).'_'.$this->referenceColumnName();
96 96
     }
97 97
 
98 98
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function joinTableName($sourceEntity, $targetEntity, $propertyName = null)
102 102
     {
103
-        return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity);
103
+        return $this->classToTableName($sourceEntity).'_'.$this->classToTableName($targetEntity);
104 104
     }
105 105
 
106 106
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function joinKeyColumnName($entityName, $referencedColumnName = null)
110 110
     {
111
-        return $this->classToTableName($entityName) . '_' .
111
+        return $this->classToTableName($entityName).'_'.
112 112
                 ($referencedColumnName ?: $this->referenceColumnName());
113 113
     }
114 114
 
Please login to merge, or discard this patch.