Passed
Pull Request — master (#288)
by
unknown
09:36
created
src/InnerResultIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
         if ($this->fetchStarted && $this->tdbmService->getConnection()->getDatabasePlatform() instanceof MySqlPlatform) {
137 137
             // Optimisation: we don't need a separate "count" SQL request in MySQL.
138 138
             assert($this->result instanceof Result);
139
-            $this->count = (int)$this->result->rowCount();
139
+            $this->count = (int) $this->result->rowCount();
140 140
             return $this->count;
141 141
         }
142 142
         return $this->getRowCountViaSqlQuery();
Please login to merge, or discard this patch.
src/SchemaVersionControl/SchemaBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                 $foreignColumns = [$foreignColumns];
119 119
             }
120 120
         }
121
-        $options = array_diff_key($constraintDesc, ['column' => 0,'columns' => 0,'references' => 0]);
121
+        $options = array_diff_key($constraintDesc, ['column' => 0, 'columns' => 0, 'references' => 0]);
122 122
         $table->addForeignKeyConstraint($foreignTable, $localColumns, $foreignColumns, $options, $name);
123 123
     }
124 124
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             $name = implode('_', $columns);
154 154
         }
155 155
 
156
-        $options = array_diff_key($indexDesc, ['column' => 0,'columns' => 0]);
156
+        $options = array_diff_key($indexDesc, ['column' => 0, 'columns' => 0]);
157 157
         if (isset($indexDesc['unique']) && $indexDesc['unique'] === true) {
158 158
             $table->addUniqueIndex($columns, $name, [], $options);
159 159
         } else {
Please login to merge, or discard this patch.
src/Utils/TDBMDaoGenerator.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
 
94 94
         // Remove all beans and daos from junction tables
95 95
         $junctionTables = $this->configuration->getSchemaAnalyzer()->detectJunctionTables(true);
96
-        $junctionTableNames = array_map(function (Table $table) {
96
+        $junctionTableNames = array_map(function(Table $table) {
97 97
             return $table->getName();
98 98
         }, $junctionTables);
99 99
 
100
-        $tableList = array_filter($tableList, function (Table $table) use ($junctionTableNames) {
100
+        $tableList = array_filter($tableList, function(Table $table) use ($junctionTableNames) {
101 101
             return !in_array($table->getName(), $junctionTableNames, true);
102 102
         });
103 103
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $fileContent = $this->psr2Fix($fileContent);
179 179
         // Add the declare strict-types directive
180 180
         $commentEnd = strpos($fileContent, ' */') + 3;
181
-        $fileContent = substr($fileContent, 0, $commentEnd) . "\n\ndeclare(strict_types=1);" . substr($fileContent, $commentEnd + 1);
181
+        $fileContent = substr($fileContent, 0, $commentEnd)."\n\ndeclare(strict_types=1);".substr($fileContent, $commentEnd + 1);
182 182
 
183 183
         $this->dumpFile($possibleBaseFileName, $fileContent);
184 184
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         $fileContent = $this->psr2Fix($fileContent);
241 241
         // Add the declare strict-types directive
242 242
         $commentEnd = strpos($fileContent, ' */') + 3;
243
-        $fileContent = substr($fileContent, 0, $commentEnd) . "\n\ndeclare(strict_types=1);" . substr($fileContent, $commentEnd + 1);
243
+        $fileContent = substr($fileContent, 0, $commentEnd)."\n\ndeclare(strict_types=1);".substr($fileContent, $commentEnd + 1);
244 244
 
245 245
         $this->dumpFile($possibleBaseFileName, $fileContent);
246 246
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     private function psr2Fix(string $content): string
279 279
     {
280 280
         // Removes the extra blank line at the end (before: `\n\n`, after: `\n`)
281
-        return rtrim($content, PHP_EOL) . PHP_EOL;
281
+        return rtrim($content, PHP_EOL).PHP_EOL;
282 282
     }
283 283
 
284 284
     /**
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         $resultIteratorClassName = $beanDescriptor->getResultIteratorClassName();
290 290
         $resultIteratorBaseClassName = $beanDescriptor->getBaseResultIteratorClassName();
291 291
         $resultIteratorNamespace = $this->configuration->getResultIteratorNamespace();
292
-        $resultIteratorBaseNamespace = $resultIteratorNamespace . '\\Generated';
292
+        $resultIteratorBaseNamespace = $resultIteratorNamespace.'\\Generated';
293 293
         $beanClassWithoutNameSpace = $beanDescriptor->getBeanClassName();
294 294
         $file = $beanDescriptor->generateResultIteratorPhpCode();
295 295
         if ($file === null) {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
         $fileContent = $this->psr2Fix($file->generate());
300 300
         $commentEnd = strpos($fileContent, ' */') + 3;
301
-        $fileContent = substr($fileContent, 0, $commentEnd) . "\n\ndeclare(strict_types=1);" . substr($fileContent, $commentEnd + 1);
301
+        $fileContent = substr($fileContent, 0, $commentEnd)."\n\ndeclare(strict_types=1);".substr($fileContent, $commentEnd + 1);
302 302
 
303 303
         $baseResultIteratorFilePath = $this->configuration->getPathFinder()->getPath($resultIteratorBaseNamespace.'\\'.$resultIteratorBaseClassName)->getPathname();
304 304
         $this->dumpFile($baseResultIteratorFilePath, $fileContent);
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 
364 364
         $constructorMethod = new MethodGenerator(
365 365
             '__construct',
366
-            [ new ParameterGenerator('container', ContainerInterface::class) ],
366
+            [new ParameterGenerator('container', ContainerInterface::class)],
367 367
             MethodGenerator::FLAG_PUBLIC,
368 368
             '$this->container = $container;'
369 369
         );
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 
380 380
             $daoInstanceProperty = new PropertyGenerator($daoInstanceName);
381 381
             $daoInstanceProperty->setVisibility(AbstractMemberGenerator::VISIBILITY_PRIVATE);
382
-            $daoInstanceProperty->setDocBlock(new DocBlockGenerator(null, null, [new VarTag(null, ['\\' . $daoNamespace . '\\' . $daoClassName, 'null'])]));
382
+            $daoInstanceProperty->setDocBlock(new DocBlockGenerator(null, null, [new VarTag(null, ['\\'.$daoNamespace.'\\'.$daoClassName, 'null'])]));
383 383
             $class->addPropertyFromGenerator($daoInstanceProperty);
384 384
 
385 385
             $fullClassNameVarExport = var_export($daoNamespace.'\\'.$daoClassName, true);
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 BODY;
393 393
 
394 394
             $getterMethod = new MethodGenerator(
395
-                'get' . $daoClassName,
395
+                'get'.$daoClassName,
396 396
                 [],
397 397
                 MethodGenerator::FLAG_PUBLIC,
398 398
                 $getterBody
@@ -404,10 +404,10 @@  discard block
 block discarded – undo
404 404
             }
405 405
 
406 406
             $setterMethod = new MethodGenerator(
407
-                'set' . $daoClassName,
408
-                [new ParameterGenerator($daoInstanceName, '\\' . $daoNamespace . '\\' . $daoClassName)],
407
+                'set'.$daoClassName,
408
+                [new ParameterGenerator($daoInstanceName, '\\'.$daoNamespace.'\\'.$daoClassName)],
409 409
                 MethodGenerator::FLAG_PUBLIC,
410
-                '$this->' . $daoInstanceName . ' = $' . $daoInstanceName . ';'
410
+                '$this->'.$daoInstanceName.' = $'.$daoInstanceName.';'
411 411
             );
412 412
             $setterMethod->setReturnType('void');
413 413
             $setterMethod = $this->configuration->getCodeGeneratorListener()->onDaoFactorySetterGenerated($setterMethod, $beanDescriptor, $this->configuration, $class);
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
             $fileContent = $this->psr2Fix($fileContent);
428 428
             // Add the declare strict-types directive
429 429
             $commentEnd = strpos($fileContent, ' */') + 3;
430
-            $fileContent = substr($fileContent, 0, $commentEnd) . "\n\ndeclare(strict_types=1);" . substr($fileContent, $commentEnd + 1);
430
+            $fileContent = substr($fileContent, 0, $commentEnd)."\n\ndeclare(strict_types=1);".substr($fileContent, $commentEnd + 1);
431 431
 
432 432
             $this->dumpFile($possibleFileName, $fileContent);
433 433
         }
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         $map = [
548 548
             Types::ARRAY => 'array',
549 549
             Types::SIMPLE_ARRAY => 'array',
550
-            Types::JSON => 'array',  // 'json' is supported from Doctrine DBAL 2.6 only.
550
+            Types::JSON => 'array', // 'json' is supported from Doctrine DBAL 2.6 only.
551 551
             'json_array' => 'array',
552 552
             Types::BIGINT => 'string',
553 553
             Types::BOOLEAN => 'bool',
Please login to merge, or discard this patch.