Completed
Pull Request — master (#341)
by
unknown
09:11
created
lib/Doctrine/Common/DataFixtures/ProxyReferenceRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function load($baseCacheName)
102 102
     {
103
-        $filename = $baseCacheName . '.ser';
103
+        $filename = $baseCacheName.'.ser';
104 104
 
105
-        if (! file_exists($filename)) {
105
+        if ( ! file_exists($filename)) {
106 106
             return false;
107 107
         }
108 108
 
@@ -126,6 +126,6 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $serializedData = $this->serialize();
128 128
 
129
-        file_put_contents($baseCacheName . '.ser', $serializedData);
129
+        file_put_contents($baseCacheName.'.ser', $serializedData);
130 130
     }
131 131
 }
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/ReferenceRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     protected function getIdentifier($reference, $uow)
62 62
     {
63 63
         // In case Reference is not yet managed in UnitOfWork
64
-        if (! $this->hasIdentifier($reference)) {
64
+        if ( ! $this->hasIdentifier($reference)) {
65 65
             $class = $this->manager->getClassMetadata(get_class($reference));
66 66
 
67 67
             return $class->getIdentifierValues($reference);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $this->references[$name] = $reference;
95 95
 
96
-        if (! $this->hasIdentifier($reference)) {
96
+        if ( ! $this->hasIdentifier($reference)) {
97 97
             return;
98 98
         }
99 99
 
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function getReference($name)
152 152
     {
153
-        if (! $this->hasReference($name)) {
153
+        if ( ! $this->hasReference($name)) {
154 154
             throw new OutOfBoundsException(sprintf('Reference to "%s" does not exist', $name));
155 155
         }
156 156
 
157 157
         $reference = $this->references[$name];
158 158
         $meta      = $this->manager->getClassMetadata(get_class($reference));
159 159
 
160
-        if (! $this->manager->contains($reference) && isset($this->identities[$name])) {
161
-            $reference               = $this->manager->getReference(
160
+        if ( ! $this->manager->contains($reference) && isset($this->identities[$name])) {
161
+            $reference = $this->manager->getReference(
162 162
                 $meta->name,
163 163
                 $this->identities[$name]
164 164
             );
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Loader.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function loadFromDirectory($dir)
82 82
     {
83
-        if (! is_dir($dir)) {
83
+        if ( ! is_dir($dir)) {
84 84
             throw new InvalidArgumentException(sprintf('"%s" does not exist', $dir));
85 85
         }
86 86
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function loadFromFile($fileName)
103 103
     {
104
-        if (! is_readable($fileName)) {
104
+        if ( ! is_readable($fileName)) {
105 105
             throw new InvalidArgumentException(sprintf('"%s" does not exist or is not readable', $fileName));
106 106
         }
107 107
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function getFixture($className)
133 133
     {
134
-        if (! isset($this->fixtures[$className])) {
134
+        if ( ! isset($this->fixtures[$className])) {
135 135
             throw new InvalidArgumentException(sprintf(
136 136
                 '"%s" is not a registered fixture',
137 137
                 $className
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         } elseif ($fixture instanceof DependentFixtureInterface) {
169 169
             $this->orderFixturesByDependencies = true;
170 170
             foreach ($fixture->getDependencies() as $class) {
171
-                if (! class_exists($class)) {
171
+                if ( ! class_exists($class)) {
172 172
                     continue;
173 173
                 }
174 174
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             $this->orderFixturesByDependencies();
195 195
         }
196 196
 
197
-        if (! $this->orderFixturesByNumber && ! $this->orderFixturesByDependencies) {
197
+        if ( ! $this->orderFixturesByNumber && ! $this->orderFixturesByDependencies) {
198 198
             $this->orderedFixtures = $this->fixtures;
199 199
         }
200 200
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
     private function orderFixturesByNumber()
242 242
     {
243 243
         $this->orderedFixtures = $this->fixtures;
244
-        usort($this->orderedFixtures, static function ($a, $b) {
244
+        usort($this->orderedFixtures, static function($a, $b) {
245 245
             if ($a instanceof OrderedFixtureInterface && $b instanceof OrderedFixtureInterface) {
246 246
                 if ($a->getOrder() === $b->getOrder()) {
247 247
                     return 0;
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
                 $this->validateDependencies($dependenciesClasses);
304 304
 
305
-                if (! is_array($dependenciesClasses) || empty($dependenciesClasses)) {
305
+                if ( ! is_array($dependenciesClasses) || empty($dependenciesClasses)) {
306 306
                     throw new InvalidArgumentException(sprintf('Method "%s" in class "%s" must return an array of classes which are dependencies for the fixture, and it must be NOT empty.', 'getDependencies', $fixtureClass));
307 307
                 }
308 308
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
         $loadedFixtureClasses = array_keys($this->fixtures);
368 368
 
369 369
         foreach ($dependenciesClasses as $class) {
370
-            if (! in_array($class, $loadedFixtureClasses)) {
370
+            if ( ! in_array($class, $loadedFixtureClasses)) {
371 371
                 throw new RuntimeException(sprintf('Fixture "%s" was declared as a dependency, but it should be added in fixture loader first.', $class));
372 372
             }
373 373
         }
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
             $reflClass  = new ReflectionClass($className);
425 425
             $sourceFile = $reflClass->getFileName();
426 426
 
427
-            if (! in_array($sourceFile, $includedFiles) || $this->isTransient($className)) {
427
+            if ( ! in_array($sourceFile, $includedFiles) || $this->isTransient($className)) {
428 428
                 continue;
429 429
             }
430 430
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Executor/ORMExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     public function execute(array $fixtures, $append = false)
62 62
     {
63 63
         $executor = $this;
64
-        $this->em->transactional(static function (EntityManagerInterface $em) use ($executor, $fixtures, $append) {
64
+        $this->em->transactional(static function(EntityManagerInterface $em) use ($executor, $fixtures, $append) {
65 65
             if ($append === false) {
66 66
                 $executor->purge();
67 67
             }
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
             if ($fixture instanceof OrderedFixtureInterface) {
106 106
                 $prefix = sprintf('[%d] ', $fixture->getOrder());
107 107
             }
108
-            $this->log('loading ' . $prefix . get_class($fixture));
108
+            $this->log('loading '.$prefix.get_class($fixture));
109 109
         }
110 110
         // additionally pass the instance of reference repository to shared fixtures
111 111
         if ($fixture instanceof SharedFixtureInterface) {
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $that = $this;
45 45
 
46
-        $function = static function ($dm) use ($append, $that, $fixtures) {
46
+        $function = static function($dm) use ($append, $that, $fixtures) {
47 47
             if ($append === false) {
48 48
                 $that->purge();
49 49
             }
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Sorter/TopologicalSorter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $definition->state = Vertex::IN_PROGRESS;
136 136
 
137 137
         foreach ($definition->dependencyList as $dependency) {
138
-            if (! isset($this->nodeList[$dependency])) {
138
+            if ( ! isset($this->nodeList[$dependency])) {
139 139
                 throw new RuntimeException(sprintf(
140 140
                     'Fixture "%s" has a dependency of fixture "%s", but it not listed to be loaded.',
141 141
                     get_class($definition->value),
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 case Vertex::VISITED:
155 155
                     break;
156 156
                 case Vertex::IN_PROGRESS:
157
-                    if (! $this->allowCyclicDependencies) {
157
+                    if ( ! $this->allowCyclicDependencies) {
158 158
                         throw new CircularReferenceException(
159 159
                             sprintf(
160 160
                                 'Graph contains cyclic dependency between the classes "%s" and'
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         foreach ($orderedTables as $tbl) {
138 138
             // If we have a filter expression, check it and skip if necessary
139
-            if (! $emptyFilterExpression && ! preg_match($filterExpr, $tbl)) {
139
+            if ( ! $emptyFilterExpression && ! preg_match($filterExpr, $tbl)) {
140 140
                 continue;
141 141
             }
142 142
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $sorter = new TopologicalSorter();
169 169
 
170 170
         foreach ($classes as $class) {
171
-            if (! $sorter->hasNode($class->name)) {
171
+            if ( ! $sorter->hasNode($class->name)) {
172 172
                 $sorter->addNode($class->name, $class);
173 173
             }
174 174
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                 $parentClass     = $em->getClassMetadata($parentClass);
178 178
                 $parentClassName = $parentClass->getName();
179 179
 
180
-                if (! $sorter->hasNode($parentClassName)) {
180
+                if ( ! $sorter->hasNode($parentClassName)) {
181 181
                     $sorter->addNode($parentClassName, $parentClass);
182 182
                 }
183 183
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             }
186 186
 
187 187
             foreach ($class->associationMappings as $assoc) {
188
-                if (! $assoc['isOwningSide']) {
188
+                if ( ! $assoc['isOwningSide']) {
189 189
                     continue;
190 190
                 }
191 191
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 $targetClass     = $em->getClassMetadata($assoc['targetEntity']);
194 194
                 $targetClassName = $targetClass->getName();
195 195
 
196
-                if (! $sorter->hasNode($targetClassName)) {
196
+                if ( ! $sorter->hasNode($targetClassName)) {
197 197
                     $sorter->addNode($targetClassName, $targetClass);
198 198
                 }
199 199
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                     $parentClass     = $em->getClassMetadata($parentClass);
206 206
                     $parentClassName = $parentClass->getName();
207 207
 
208
-                    if (! $sorter->hasNode($parentClassName)) {
208
+                    if ( ! $sorter->hasNode($parentClassName)) {
209 209
                         $sorter->addNode($parentClassName, $parentClass);
210 210
                     }
211 211
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
         foreach ($classes as $class) {
230 230
             foreach ($class->associationMappings as $assoc) {
231
-                if (! $assoc['isOwningSide'] || $assoc['type'] !== ClassMetadata::MANY_TO_MANY) {
231
+                if ( ! $assoc['isOwningSide'] || $assoc['type'] !== ClassMetadata::MANY_TO_MANY) {
232 232
                     continue;
233 233
                 }
234 234
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     private function getTableName(ClassMetadata $class, AbstractPlatform $platform) : string
243 243
     {
244 244
         if (isset($class->table['schema']) && ! method_exists($class, 'getSchemaName')) {
245
-            return $class->table['schema'] . '.' . $this->em->getConfiguration()->getQuoteStrategy()->getTableName($class, $platform);
245
+            return $class->table['schema'].'.'.$this->em->getConfiguration()->getQuoteStrategy()->getTableName($class, $platform);
246 246
         }
247 247
 
248 248
         return $this->em->getConfiguration()->getQuoteStrategy()->getTableName($class, $platform);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     private function getJoinTableName($assoc, $class, $platform)
259 259
     {
260 260
         if (isset($assoc['joinTable']['schema']) && ! method_exists($class, 'getSchemaName')) {
261
-            return $assoc['joinTable']['schema'] . '.' . $this->em->getConfiguration()->getQuoteStrategy()->getJoinTableName($assoc, $class, $platform);
261
+            return $assoc['joinTable']['schema'].'.'.$this->em->getConfiguration()->getQuoteStrategy()->getJoinTableName($assoc, $class, $platform);
262 262
         }
263 263
 
264 264
         return $this->em->getConfiguration()->getQuoteStrategy()->getJoinTableName($assoc, $class, $platform);
@@ -268,6 +268,6 @@  discard block
 block discarded – undo
268 268
     {
269 269
         $tableIdentifier = new Identifier($tableName);
270 270
 
271
-        return 'DELETE FROM ' . $tableIdentifier->getQuotedName($platform);
271
+        return 'DELETE FROM '.$tableIdentifier->getQuotedName($platform);
272 272
     }
273 273
 }
Please login to merge, or discard this patch.