Completed
Push — master ( 26048c...3d0d8c )
by Andreas
05:18 queued 11s
created
lib/Doctrine/Common/DataFixtures/ReferenceRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,14 +137,14 @@
 block discarded – undo
137 137
      */
138 138
     public function getReference($name)
139 139
     {
140
-        if (!$this->hasReference($name)) {
140
+        if ( ! $this->hasReference($name)) {
141 141
             throw new \OutOfBoundsException("Reference to: ({$name}) does not exist");
142 142
         }
143 143
 
144 144
         $reference = $this->references[$name];
145 145
         $meta = $this->manager->getClassMetadata(get_class($reference));
146 146
 
147
-        if (!$this->manager->contains($reference) && isset($this->identities[$name])) {
147
+        if ( ! $this->manager->contains($reference) && isset($this->identities[$name])) {
148 148
             $reference = $this->manager->getReference(
149 149
                 $meta->name,
150 150
                 $this->identities[$name]
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Loader.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function loadFromDirectory($dir)
56 56
     {
57
-        if (!is_dir($dir)) {
57
+        if ( ! is_dir($dir)) {
58 58
             throw new \InvalidArgumentException(sprintf('"%s" does not exist', $dir));
59 59
         }
60 60
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function loadFromFile($fileName)
75 75
     {
76
-        if (!is_readable($fileName)) {
76
+        if ( ! is_readable($fileName)) {
77 77
             throw new \InvalidArgumentException(sprintf('"%s" does not exist or is not readable', $fileName));
78 78
         }
79 79
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function getFixture($className)
103 103
     {
104
-        if (!isset($this->fixtures[$className])) {
104
+        if ( ! isset($this->fixtures[$className])) {
105 105
             throw new \InvalidArgumentException(sprintf(
106 106
                 '"%s" is not a registered fixture',
107 107
                 $className
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $fixtureClass = get_class($fixture);
122 122
 
123
-        if (!isset($this->fixtures[$fixtureClass])) {
123
+        if ( ! isset($this->fixtures[$fixtureClass])) {
124 124
             if ($fixture instanceof OrderedFixtureInterface && $fixture instanceof DependentFixtureInterface) {
125 125
                 throw new \InvalidArgumentException(sprintf('Class "%s" can\'t implement "%s" and "%s" at the same time.', 
126 126
                     get_class($fixture),
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 $this->orderFixturesByNumber = true;
135 135
             } elseif ($fixture instanceof DependentFixtureInterface) {
136 136
                 $this->orderFixturesByDependencies = true;
137
-                foreach($fixture->getDependencies() as $class) {
137
+                foreach ($fixture->getDependencies() as $class) {
138 138
                     if (class_exists($class)) {
139 139
                         $this->addFixture($this->createFixture($class));
140 140
                     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $this->orderFixturesByDependencies();
161 161
         }
162 162
         
163
-        if (!$this->orderFixturesByNumber && !$this->orderFixturesByDependencies) {
163
+        if ( ! $this->orderFixturesByNumber && ! $this->orderFixturesByDependencies) {
164 164
             $this->orderedFixtures = $this->fixtures;
165 165
         }
166 166
 
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
         if ($this->orderFixturesByNumber) {
237 237
             $count = count($this->orderedFixtures);
238 238
 
239
-            for ($i = 0 ; $i < $count ; ++$i) {
240
-                if (!($this->orderedFixtures[$i] instanceof OrderedFixtureInterface)) {
239
+            for ($i = 0; $i < $count; ++$i) {
240
+                if ( ! ($this->orderedFixtures[$i] instanceof OrderedFixtureInterface)) {
241 241
                     unset($this->orderedFixtures[$i]);
242 242
                 }
243 243
             }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                 
255 255
                 $this->validateDependencies($dependenciesClasses);
256 256
 
257
-                if (!is_array($dependenciesClasses) || empty($dependenciesClasses)) {
257
+                if ( ! is_array($dependenciesClasses) || empty($dependenciesClasses)) {
258 258
                     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));
259 259
                 }
260 260
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         $loadedFixtureClasses = array_keys($this->fixtures);
318 318
         
319 319
         foreach ($dependenciesClasses as $class) {
320
-            if (!in_array($class, $loadedFixtureClasses)) {
320
+            if ( ! in_array($class, $loadedFixtureClasses)) {
321 321
                 throw new \RuntimeException(sprintf('Fixture "%s" was declared as a dependency, but it should be added in fixture loader first.', $class));
322 322
             }
323 323
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,9 @@
 block discarded – undo
176 176
     public function isTransient($className)
177 177
     {
178 178
         $rc = new \ReflectionClass($className);
179
-        if ($rc->isAbstract()) return true;
179
+        if ($rc->isAbstract()) {
180
+            return true;
181
+        }
180 182
 
181 183
         $interfaces = class_implements($className);
182 184
         return in_array(FixtureInterface::class, $interfaces) ? false : true;
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 = function ($dm) use ($append, $that, $fixtures) {
46
+        $function = 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/Executor/AbstractExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@
 block discarded – undo
105 105
         if ($this->logger) {
106 106
             $prefix = '';
107 107
             if ($fixture instanceof OrderedFixtureInterface) {
108
-                $prefix = sprintf('[%d] ',$fixture->getOrder());
108
+                $prefix = sprintf('[%d] ', $fixture->getOrder());
109 109
             }
110
-            $this->log('loading ' . $prefix . get_class($fixture));
110
+            $this->log('loading '.$prefix.get_class($fixture));
111 111
         }
112 112
         // additionally pass the instance of reference repository to shared fixtures
113 113
         if ($fixture instanceof SharedFixtureInterface) {
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/ProxyReferenceRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function load($baseCacheName)
98 98
     {
99
-        $filename = $baseCacheName . '.ser';
99
+        $filename = $baseCacheName.'.ser';
100 100
 
101 101
         if ( ! file_exists($filename) || ($serializedData = file_get_contents($filename)) === false) {
102 102
             return false;
@@ -116,6 +116,6 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $serializedData = $this->serialize();
118 118
 
119
-        file_put_contents($baseCacheName . '.ser', $serializedData);
119
+        file_put_contents($baseCacheName.'.ser', $serializedData);
120 120
     }
121 121
 }
Please login to merge, or discard this patch.
lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
     private $purgeMode = self::PURGE_MODE_DELETE;
31 31
 
32 32
     /**
33
-    * Table/view names to be excleded from purge
34
-    *
35
-    * @var string[]
36
-    */
33
+     * Table/view names to be excleded from purge
34
+     *
35
+     * @var string[]
36
+     */
37 37
     private $excluded;
38 38
 
39 39
     /**
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function setEntityManager(EntityManagerInterface $em)
78 78
     {
79
-      $this->em = $em;
79
+        $this->em = $em;
80 80
     }
81 81
 
82 82
     /**
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $classes = [];
99 99
 
100 100
         foreach ($this->em->getMetadataFactory()->getAllMetadata() as $metadata) {
101
-            if (! $metadata->isMappedSuperclass && ! (isset($metadata->isEmbeddedClass) && $metadata->isEmbeddedClass)) {
101
+            if ( ! $metadata->isMappedSuperclass && ! (isset($metadata->isEmbeddedClass) && $metadata->isEmbeddedClass)) {
102 102
                 $classes[] = $metadata;
103 103
             }
104 104
         }
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 
133 133
         $schemaAssetsFilter = method_exists($connection->getConfiguration(), 'getSchemaAssetsFilter') ? $connection->getConfiguration()->getSchemaAssetsFilter() : null;
134 134
 
135
-        foreach($orderedTables as $tbl) {
135
+        foreach ($orderedTables as $tbl) {
136 136
             // If we have a filter expression, check it and skip if necessary
137
-            if (!$emptyFilterExpression && !preg_match($filterExpr, $tbl)) {
137
+            if ( ! $emptyFilterExpression && ! preg_match($filterExpr, $tbl)) {
138 138
                 continue;
139 139
             }
140 140
 
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
144 144
             }
145 145
 
146 146
             // Support schema asset filters as presented in
147
-            if (is_callable($schemaAssetsFilter) && !$schemaAssetsFilter($tbl)) {
147
+            if (is_callable($schemaAssetsFilter) && ! $schemaAssetsFilter($tbl)) {
148 148
                 continue;
149 149
             }
150 150
 
151 151
             if ($this->purgeMode === self::PURGE_MODE_DELETE) {
152
-                $connection->executeUpdate("DELETE FROM " . $tbl);
152
+                $connection->executeUpdate("DELETE FROM ".$tbl);
153 153
             } else {
154 154
                 $connection->executeUpdate($platform->getTruncateTableSQL($tbl, true));
155 155
             }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      */
243 243
     private function getTableName($class, $platform)
244 244
     {
245
-        if (isset($class->table['schema']) && !method_exists($class, 'getSchemaName')) {
245
+        if (isset($class->table['schema']) && ! method_exists($class, 'getSchemaName')) {
246 246
             return $class->table['schema'].'.'.$this->em->getConfiguration()->getQuoteStrategy()->getTableName($class, $platform);
247 247
         }
248 248
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     private function getJoinTableName($assoc, $class, $platform)
260 260
     {
261
-        if (isset($assoc['joinTable']['schema']) && !method_exists($class, 'getSchemaName')) {
261
+        if (isset($assoc['joinTable']['schema']) && ! method_exists($class, 'getSchemaName')) {
262 262
             return $assoc['joinTable']['schema'].'.'.$this->em->getConfiguration()->getQuoteStrategy()->getJoinTableName($assoc, $class, $platform);
263 263
         }
264 264
 
Please login to merge, or discard this patch.