Completed
Pull Request — master (#5626)
by Gary
09:09
created
lib/Shitty/ORM/Tools/Pagination/CountOutputWalker.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Doctrine ORM
4
- *
5
- * LICENSE
6
- *
7
- * This source file is subject to the new BSD license that is bundled
8
- * with this package in the file LICENSE.txt.
9
- * If you did not receive a copy of the license and are unable to
10
- * obtain it through the world-wide-web, please send an email
11
- * to [email protected] so I can send you a copy immediately.
12
- */
3
+     * Doctrine ORM
4
+     *
5
+     * LICENSE
6
+     *
7
+     * This source file is subject to the new BSD license that is bundled
8
+     * with this package in the file LICENSE.txt.
9
+     * If you did not receive a copy of the license and are unable to
10
+     * obtain it through the world-wide-web, please send an email
11
+     * to [email protected] so I can send you a copy immediately.
12
+     */
13 13
 
14 14
 namespace Doctrine\ORM\Tools\Pagination;
15 15
 
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/Pagination/WhereInWalker.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Doctrine ORM
4
- *
5
- * LICENSE
6
- *
7
- * This source file is subject to the new BSD license that is bundled
8
- * with this package in the file LICENSE. This license can also be viewed
9
- * at http://hobodave.com/license.txt
10
- *
11
- * @category    DoctrineExtensions
12
- * @package     DoctrineExtensions\Paginate
13
- * @author      David Abdemoulaie <[email protected]>
14
- * @copyright   Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/)
15
- * @license     http://hobodave.com/license.txt New BSD License
16
- */
3
+     * Doctrine ORM
4
+     *
5
+     * LICENSE
6
+     *
7
+     * This source file is subject to the new BSD license that is bundled
8
+     * with this package in the file LICENSE. This license can also be viewed
9
+     * at http://hobodave.com/license.txt
10
+     *
11
+     * @category    DoctrineExtensions
12
+     * @package     DoctrineExtensions\Paginate
13
+     * @author      David Abdemoulaie <[email protected]>
14
+     * @copyright   Copyright (c) 2010 David Abdemoulaie (http://hobodave.com/)
15
+     * @license     http://hobodave.com/license.txt New BSD License
16
+     */
17 17
 
18 18
 namespace Doctrine\ORM\Tools\Pagination;
19 19
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
                 array($pathExpression)
101 101
             );
102 102
             $expression = new InExpression($arithmeticExpression);
103
-            $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS);
103
+            $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS);
104 104
 
105 105
         } else {
106 106
             $expression = new NullComparisonExpression($pathExpression);
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/Pagination/CountWalker.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Doctrine ORM
4
- *
5
- * LICENSE
6
- *
7
- * This source file is subject to the new BSD license that is bundled
8
- * with this package in the file LICENSE.txt.
9
- * If you did not receive a copy of the license and are unable to
10
- * obtain it through the world-wide-web, please send an email
11
- * to [email protected] so I can send you a copy immediately.
12
- */
3
+     * Doctrine ORM
4
+     *
5
+     * LICENSE
6
+     *
7
+     * This source file is subject to the new BSD license that is bundled
8
+     * with this package in the file LICENSE.txt.
9
+     * If you did not receive a copy of the license and are unable to
10
+     * obtain it through the world-wide-web, please send an email
11
+     * to [email protected] so I can send you a copy immediately.
12
+     */
13 13
 
14 14
 namespace Doctrine\ORM\Tools\Pagination;
15 15
 
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/Pagination/RowNumberOverFunction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
      */
44 44
     public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
45 45
     {
46
-        return 'ROW_NUMBER() OVER(' . trim($sqlWalker->walkOrderByClause(
46
+        return 'ROW_NUMBER() OVER('.trim($sqlWalker->walkOrderByClause(
47 47
             $this->orderByClause
48
-        )) . ')';
48
+        )).')';
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/ToolsException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      */
37 37
     public static function schemaToolFailure($sql, \Exception $e)
38 38
     {
39
-        return new self("Schema-Tool failed with Error '" . $e->getMessage() . "' while executing DDL: " . $sql, "0", $e);
39
+        return new self("Schema-Tool failed with Error '".$e->getMessage()."' while executing DDL: ".$sql, "0", $e);
40 40
     }
41 41
 
42 42
     /**
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/EntityRepositoryGenerator.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
         $code = $this->generateEntityRepositoryClass($fullClassName);
144 144
 
145 145
         $path = $outputDirectory . DIRECTORY_SEPARATOR
146
-              . str_replace('\\', \DIRECTORY_SEPARATOR, $fullClassName) . '.php';
146
+                . str_replace('\\', \DIRECTORY_SEPARATOR, $fullClassName) . '.php';
147 147
         $dir = dirname($path);
148 148
 
149 149
         if ( ! is_dir($dir)) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $namespace = $this->getClassNamespace($fullClassName);
113 113
 
114
-        return $namespace ? 'namespace ' . $namespace . ';' : '';
114
+        return $namespace ? 'namespace '.$namespace.';' : '';
115 115
     }
116 116
 
117 117
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $repositoryName = $this->repositoryName ?: 'Doctrine\ORM\EntityRepository';
127 127
 
128 128
         if ($namespace && $repositoryName[0] !== '\\') {
129
-            $repositoryName = '\\' . $repositoryName;
129
+            $repositoryName = '\\'.$repositoryName;
130 130
         }
131 131
 
132 132
         return $repositoryName;
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $code = $this->generateEntityRepositoryClass($fullClassName);
144 144
 
145
-        $path = $outputDirectory . DIRECTORY_SEPARATOR
146
-              . str_replace('\\', \DIRECTORY_SEPARATOR, $fullClassName) . '.php';
145
+        $path = $outputDirectory.DIRECTORY_SEPARATOR
146
+              . str_replace('\\', \DIRECTORY_SEPARATOR, $fullClassName).'.php';
147 147
         $dir = dirname($path);
148 148
 
149 149
         if ( ! is_dir($dir)) {
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/SchemaTool.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                             $inheritedKeyColumns[] = $columnName;
224 224
                         }
225 225
                     }
226
-                    if (!empty($inheritedKeyColumns)) {
226
+                    if ( ! empty($inheritedKeyColumns)) {
227 227
                         // Add a FK constraint on the ID column
228 228
                         $table->addForeignKeyConstraint(
229 229
                             $this->quoteStrategy->getTableName(
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             }
331 331
         }
332 332
 
333
-        if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas() ) {
333
+        if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) {
334 334
             $schema->visit(new RemoveNamespacedAssets());
335 335
         }
336 336
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
         // For now, this is a hack required for single table inheritence, since this method is called
406 406
         // twice by single table inheritence relations
407
-        if (!$table->hasIndex('primary')) {
407
+        if ( ! $table->hasIndex('primary')) {
408 408
             //$table->setPrimaryKey($pkColumns);
409 409
         }
410 410
     }
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
             if ( ! $definingClass) {
642 642
                 throw new \Doctrine\ORM\ORMException(
643 643
                     "Column name `".$joinColumn['referencedColumnName']."` referenced for relation from ".
644
-                    $mapping['sourceEntity'] . " towards ". $mapping['targetEntity'] . " does not exist."
644
+                    $mapping['sourceEntity']." towards ".$mapping['targetEntity']." does not exist."
645 645
                 );
646 646
             }
647 647
 
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
                 $columnOptions = array('notnull' => false, 'columnDefinition' => $columnDef);
674 674
 
675 675
                 if (isset($joinColumn['nullable'])) {
676
-                    $columnOptions['notnull'] = !$joinColumn['nullable'];
676
+                    $columnOptions['notnull'] = ! $joinColumn['nullable'];
677 677
                 }
678 678
 
679 679
                 if (isset($fieldMapping['options'])) {
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
                 }
721 721
             }
722 722
             $blacklistedFks[$compositeName] = true;
723
-        } elseif (!isset($blacklistedFks[$compositeName])) {
723
+        } elseif ( ! isset($blacklistedFks[$compositeName])) {
724 724
             $addedFks[$compositeName] = array('foreignTableName' => $foreignTableName, 'foreignColumns' => $foreignColumns);
725 725
             $theJoinTable->addUnnamedForeignKeyConstraint(
726 726
                 $foreignTableName,
@@ -827,7 +827,7 @@  discard block
 block discarded – undo
827 827
                 if ($table->hasPrimaryKey()) {
828 828
                     $columns = $table->getPrimaryKey()->getColumns();
829 829
                     if (count($columns) == 1) {
830
-                        $checkSequence = $table->getName() . "_" . $columns[0] . "_seq";
830
+                        $checkSequence = $table->getName()."_".$columns[0]."_seq";
831 831
                         if ($fullSchema->hasSequence($checkSequence)) {
832 832
                             $visitor->acceptSequence($fullSchema->getSequence($checkSequence));
833 833
                         }
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/DebugUnitOfWorkListener.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -87,42 +87,42 @@
 block discarded – undo
87 87
 
88 88
         fwrite($fh, "Flush Operation [".$this->context."] - Dumping identity map:\n");
89 89
         foreach ($identityMap as $className => $map) {
90
-            fwrite($fh, "Class: ". $className . "\n");
90
+            fwrite($fh, "Class: ".$className."\n");
91 91
 
92 92
             foreach ($map as $entity) {
93
-                fwrite($fh, " Entity: " . $this->getIdString($entity, $uow) . " " . spl_object_hash($entity)."\n");
93
+                fwrite($fh, " Entity: ".$this->getIdString($entity, $uow)." ".spl_object_hash($entity)."\n");
94 94
                 fwrite($fh, "  Associations:\n");
95 95
 
96 96
                 $cm = $em->getClassMetadata($className);
97 97
 
98 98
                 foreach ($cm->associationMappings as $field => $assoc) {
99
-                    fwrite($fh, "   " . $field . " ");
99
+                    fwrite($fh, "   ".$field." ");
100 100
                     $value = $cm->getFieldValue($entity, $field);
101 101
 
102 102
                     if ($assoc['type'] & ClassMetadata::TO_ONE) {
103 103
                         if ($value === null) {
104 104
                             fwrite($fh, " NULL\n");
105 105
                         } else {
106
-                            if ($value instanceof Proxy && !$value->__isInitialized()) {
106
+                            if ($value instanceof Proxy && ! $value->__isInitialized()) {
107 107
                                 fwrite($fh, "[PROXY] ");
108 108
                             }
109 109
 
110
-                            fwrite($fh, $this->getIdString($value, $uow) . " " . spl_object_hash($value) . "\n");
110
+                            fwrite($fh, $this->getIdString($value, $uow)." ".spl_object_hash($value)."\n");
111 111
                         }
112 112
                     } else {
113
-                        $initialized = !($value instanceof PersistentCollection) || $value->isInitialized();
113
+                        $initialized = ! ($value instanceof PersistentCollection) || $value->isInitialized();
114 114
                         if ($value === null) {
115 115
                             fwrite($fh, " NULL\n");
116 116
                         } elseif ($initialized) {
117
-                            fwrite($fh, "[INITIALIZED] " . $this->getType($value). " " . count($value) . " elements\n");
117
+                            fwrite($fh, "[INITIALIZED] ".$this->getType($value)." ".count($value)." elements\n");
118 118
 
119 119
                             foreach ($value as $obj) {
120
-                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
120
+                                fwrite($fh, "    ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n");
121 121
                             }
122 122
                         } else {
123
-                            fwrite($fh, "[PROXY] " . $this->getType($value) . " unknown element size\n");
123
+                            fwrite($fh, "[PROXY] ".$this->getType($value)." unknown element size\n");
124 124
                             foreach ($value->unwrap() as $obj) {
125
-                                fwrite($fh, "    " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n");
125
+                                fwrite($fh, "    ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n");
126 126
                             }
127 127
                         }
128 128
                     }
Please login to merge, or discard this patch.
lib/Shitty/ORM/Tools/EntityGenerator.php 3 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1290,7 +1290,7 @@  discard block
 block discarded – undo
1290 1290
 
1291 1291
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1292 1292
             $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1293
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1293
+                        . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1294 1294
         }
1295 1295
 
1296 1296
         return implode("\n", $lines);
@@ -1318,7 +1318,7 @@  discard block
 block discarded – undo
1318 1318
 
1319 1319
             $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
1320 1320
             $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName']
1321
-                     . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1321
+                        . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1322 1322
         }
1323 1323
 
1324 1324
         return implode("\n", $lines);
@@ -1381,14 +1381,14 @@  discard block
 block discarded – undo
1381 1381
         }
1382 1382
 
1383 1383
         $replacements = array(
1384
-          '<description>'       => ucfirst($type) . ' ' . $variableName,
1385
-          '<methodTypeHint>'    => $methodTypeHint,
1386
-          '<variableType>'      => $variableType,
1387
-          '<variableName>'      => $variableName,
1388
-          '<methodName>'        => $methodName,
1389
-          '<fieldName>'         => $fieldName,
1390
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1391
-          '<entity>'            => $this->getClassName($metadata)
1384
+            '<description>'       => ucfirst($type) . ' ' . $variableName,
1385
+            '<methodTypeHint>'    => $methodTypeHint,
1386
+            '<variableType>'      => $variableType,
1387
+            '<variableName>'      => $variableName,
1388
+            '<methodName>'        => $methodName,
1389
+            '<fieldName>'         => $fieldName,
1390
+            '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1391
+            '<entity>'            => $this->getClassName($metadata)
1392 1392
         );
1393 1393
 
1394 1394
         $method = str_replace(
Please login to merge, or discard this patch.
Spacing   +142 added lines, -142 removed lines patch added patch discarded remove patch
@@ -364,14 +364,14 @@  discard block
 block discarded – undo
364 364
      */
365 365
     public function writeEntityClass(ClassMetadataInfo $metadata, $outputDirectory)
366 366
     {
367
-        $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name) . $this->extension;
367
+        $path = $outputDirectory.'/'.str_replace('\\', DIRECTORY_SEPARATOR, $metadata->name).$this->extension;
368 368
         $dir = dirname($path);
369 369
 
370 370
         if ( ! is_dir($dir)) {
371 371
             mkdir($dir, 0775, true);
372 372
         }
373 373
 
374
-        $this->isNew = !file_exists($path) || (file_exists($path) && $this->regenerateEntityIfExists);
374
+        $this->isNew = ! file_exists($path) || (file_exists($path) && $this->regenerateEntityIfExists);
375 375
 
376 376
         if ( ! $this->isNew) {
377 377
             $this->parseTokensInEntityFile(file_get_contents($path));
@@ -380,8 +380,8 @@  discard block
 block discarded – undo
380 380
         }
381 381
 
382 382
         if ($this->backupExisting && file_exists($path)) {
383
-            $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
384
-            if (!copy($path, $backupPath)) {
383
+            $backupPath = dirname($path).DIRECTORY_SEPARATOR.basename($path)."~";
384
+            if ( ! copy($path, $backupPath)) {
385 385
                 throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed.");
386 386
             }
387 387
         }
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
             $this->generateEntityBody($metadata)
422 422
         );
423 423
 
424
-        $code = str_replace($placeHolders, $replacements, static::$classTemplate) . "\n";
424
+        $code = str_replace($placeHolders, $replacements, static::$classTemplate)."\n";
425 425
 
426 426
         return str_replace('<spaces>', $this->spaces, $code);
427 427
     }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         $body = str_replace('<spaces>', $this->spaces, $body);
443 443
         $last = strrpos($currentCode, '}');
444 444
 
445
-        return substr($currentCode, 0, $last) . $body . (strlen($body) > 0 ? "\n" : '') . "}\n";
445
+        return substr($currentCode, 0, $last).$body.(strlen($body) > 0 ? "\n" : '')."}\n";
446 446
     }
447 447
 
448 448
     /**
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
     public function setFieldVisibility($visibility)
507 507
     {
508 508
         if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) {
509
-            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility);
509
+            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility);
510 510
         }
511 511
 
512 512
         $this->fieldVisibility = $visibility;
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
     protected function generateEntityNamespace(ClassMetadataInfo $metadata)
605 605
     {
606 606
         if ($this->hasNamespace($metadata)) {
607
-            return 'namespace ' . $this->getNamespace($metadata) .';';
607
+            return 'namespace '.$this->getNamespace($metadata).';';
608 608
         }
609 609
     }
610 610
 
@@ -624,8 +624,8 @@  discard block
 block discarded – undo
624 624
      */
625 625
     protected function generateEntityClassName(ClassMetadataInfo $metadata)
626 626
     {
627
-        return 'class ' . $this->getClassName($metadata) .
628
-            ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null);
627
+        return 'class '.$this->getClassName($metadata).
628
+            ($this->extendsClass() ? ' extends '.$this->getClassToExtendName() : null);
629 629
     }
630 630
 
631 631
     /**
@@ -727,13 +727,13 @@  discard block
 block discarded – undo
727 727
         $fieldMappings = array_merge($requiredFields, $optionalFields);
728 728
 
729 729
         foreach ($metadata->embeddedClasses as $fieldName => $embeddedClass) {
730
-            $paramType = '\\' . ltrim($embeddedClass['class'], '\\');
731
-            $paramVariable = '$' . $fieldName;
730
+            $paramType = '\\'.ltrim($embeddedClass['class'], '\\');
731
+            $paramVariable = '$'.$fieldName;
732 732
 
733 733
             $paramTypes[] = $paramType;
734 734
             $paramVariables[] = $paramVariable;
735
-            $params[] = $paramType . ' ' . $paramVariable;
736
-            $fields[] = '$this->' . $fieldName . ' = ' . $paramVariable . ';';
735
+            $params[] = $paramType.' '.$paramVariable;
736
+            $fields[] = '$this->'.$fieldName.' = '.$paramVariable.';';
737 737
         }
738 738
 
739 739
         foreach ($fieldMappings as $fieldMapping) {
@@ -743,27 +743,27 @@  discard block
 block discarded – undo
743 743
                 continue;
744 744
             }
745 745
 
746
-            $paramTypes[] = $this->getType($fieldMapping['type']) . (!empty($fieldMapping['nullable']) ? '|null' : '');
747
-            $param = '$' . $fieldMapping['fieldName'];
746
+            $paramTypes[] = $this->getType($fieldMapping['type']).( ! empty($fieldMapping['nullable']) ? '|null' : '');
747
+            $param = '$'.$fieldMapping['fieldName'];
748 748
             $paramVariables[] = $param;
749 749
 
750 750
             if ($fieldMapping['type'] === 'datetime') {
751
-                $param = $this->getType($fieldMapping['type']) . ' ' . $param;
751
+                $param = $this->getType($fieldMapping['type']).' '.$param;
752 752
             }
753 753
 
754
-            if (!empty($fieldMapping['nullable'])) {
754
+            if ( ! empty($fieldMapping['nullable'])) {
755 755
                 $param .= ' = null';
756 756
             }
757 757
 
758 758
             $params[] = $param;
759 759
 
760
-            $fields[] = '$this->' . $fieldMapping['fieldName'] . ' = $' . $fieldMapping['fieldName'] . ';';
760
+            $fields[] = '$this->'.$fieldMapping['fieldName'].' = $'.$fieldMapping['fieldName'].';';
761 761
         }
762 762
 
763 763
         $maxParamTypeLength = max(array_map('strlen', $paramTypes));
764 764
         $paramTags = array_map(
765
-            function ($type, $variable) use ($maxParamTypeLength) {
766
-                return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable;
765
+            function($type, $variable) use ($maxParamTypeLength) {
766
+                return '@param '.$type.str_repeat(' ', $maxParamTypeLength - strlen($type) + 1).$variable;
767 767
             },
768 768
             $paramTypes,
769 769
             $paramVariables
@@ -771,8 +771,8 @@  discard block
 block discarded – undo
771 771
 
772 772
         // Generate multi line constructor if the signature exceeds 120 characters.
773 773
         if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) {
774
-            $delimiter = "\n" . $this->spaces;
775
-            $params = $delimiter . implode(',' . $delimiter, $params) . "\n";
774
+            $delimiter = "\n".$this->spaces;
775
+            $params = $delimiter.implode(','.$delimiter, $params)."\n";
776 776
         } else {
777 777
             $params = implode(', ', $params);
778 778
         }
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
         $replacements = array(
781 781
             '<paramTags>' => implode("\n * ", $paramTags),
782 782
             '<params>'    => $params,
783
-            '<fields>'    => implode("\n" . $this->spaces, $fields),
783
+            '<fields>'    => implode("\n".$this->spaces, $fields),
784 784
         );
785 785
 
786 786
         $constructor = str_replace(
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 
825 825
             if ($inClass) {
826 826
                 $inClass = false;
827
-                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
827
+                $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1];
828 828
                 $this->staticReflection[$lastSeenClass]['properties'] = array();
829 829
                 $this->staticReflection[$lastSeenClass]['methods'] = array();
830 830
             }
@@ -832,16 +832,16 @@  discard block
 block discarded – undo
832 832
             if ($token[0] == T_NAMESPACE) {
833 833
                 $lastSeenNamespace = "";
834 834
                 $inNamespace = true;
835
-            } elseif ($token[0] == T_CLASS && $tokens[$i-1][0] != T_DOUBLE_COLON) {
835
+            } elseif ($token[0] == T_CLASS && $tokens[$i - 1][0] != T_DOUBLE_COLON) {
836 836
                 $inClass = true;
837 837
             } elseif ($token[0] == T_FUNCTION) {
838
-                if ($tokens[$i+2][0] == T_STRING) {
839
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]);
840
-                } elseif ($tokens[$i+2] == "&" && $tokens[$i+3][0] == T_STRING) {
841
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]);
838
+                if ($tokens[$i + 2][0] == T_STRING) {
839
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]);
840
+                } elseif ($tokens[$i + 2] == "&" && $tokens[$i + 3][0] == T_STRING) {
841
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]);
842 842
                 }
843
-            } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i+2][0] != T_FUNCTION) {
844
-                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1);
843
+            } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED)) && $tokens[$i + 2][0] != T_FUNCTION) {
844
+                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1);
845 845
             }
846 846
         }
847 847
     }
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
      */
855 855
     protected function hasProperty($property, ClassMetadataInfo $metadata)
856 856
     {
857
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
857
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
858 858
             // don't generate property if its already on the base class.
859 859
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
860 860
             if ($reflClass->hasProperty($property)) {
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
      */
884 884
     protected function hasMethod($method, ClassMetadataInfo $metadata)
885 885
     {
886
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
886
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
887 887
             // don't generate method if its already on the base class.
888 888
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
889 889
 
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
      */
913 913
     protected function getTraits(ClassMetadataInfo $metadata)
914 914
     {
915
-        if (! ($metadata->reflClass !== null || class_exists($metadata->name))) {
915
+        if ( ! ($metadata->reflClass !== null || class_exists($metadata->name))) {
916 916
             return [];
917 917
         }
918 918
 
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
     {
965 965
         $refl = new \ReflectionClass($this->getClassToExtend());
966 966
 
967
-        return '\\' . $refl->getName();
967
+        return '\\'.$refl->getName();
968 968
     }
969 969
 
970 970
     /**
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
     {
998 998
         $lines = array();
999 999
         $lines[] = '/**';
1000
-        $lines[] = ' * ' . $this->getClassName($metadata);
1000
+        $lines[] = ' * '.$this->getClassName($metadata);
1001 1001
 
1002 1002
         if ($this->generateAnnotations) {
1003 1003
             $lines[] = ' *';
@@ -1012,12 +1012,12 @@  discard block
 block discarded – undo
1012 1012
 
1013 1013
             foreach ($methods as $method) {
1014 1014
                 if ($code = $this->$method($metadata)) {
1015
-                    $lines[] = ' * ' . $code;
1015
+                    $lines[] = ' * '.$code;
1016 1016
                 }
1017 1017
             }
1018 1018
 
1019 1019
             if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
1020
-                $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks';
1020
+                $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks';
1021 1021
             }
1022 1022
         }
1023 1023
 
@@ -1033,17 +1033,17 @@  discard block
 block discarded – undo
1033 1033
      */
1034 1034
     protected function generateEntityAnnotation(ClassMetadataInfo $metadata)
1035 1035
     {
1036
-        $prefix = '@' . $this->annotationsPrefix;
1036
+        $prefix = '@'.$this->annotationsPrefix;
1037 1037
 
1038 1038
         if ($metadata->isEmbeddedClass) {
1039
-            return $prefix . 'Embeddable';
1039
+            return $prefix.'Embeddable';
1040 1040
         }
1041 1041
 
1042 1042
         $customRepository = $metadata->customRepositoryClassName
1043
-            ? '(repositoryClass="' . $metadata->customRepositoryClassName . '")'
1043
+            ? '(repositoryClass="'.$metadata->customRepositoryClassName.'")'
1044 1044
             : '';
1045 1045
 
1046
-        return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository;
1046
+        return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository;
1047 1047
     }
1048 1048
 
1049 1049
     /**
@@ -1060,28 +1060,28 @@  discard block
 block discarded – undo
1060 1060
         $table = array();
1061 1061
 
1062 1062
         if (isset($metadata->table['schema'])) {
1063
-            $table[] = 'schema="' . $metadata->table['schema'] . '"';
1063
+            $table[] = 'schema="'.$metadata->table['schema'].'"';
1064 1064
         }
1065 1065
 
1066 1066
         if (isset($metadata->table['name'])) {
1067
-            $table[] = 'name="' . $metadata->table['name'] . '"';
1067
+            $table[] = 'name="'.$metadata->table['name'].'"';
1068 1068
         }
1069 1069
 
1070 1070
         if (isset($metadata->table['options']) && $metadata->table['options']) {
1071
-            $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}';
1071
+            $table[] = 'options={'.$this->exportTableOptions((array) $metadata->table['options']).'}';
1072 1072
         }
1073 1073
 
1074 1074
         if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
1075 1075
             $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']);
1076
-            $table[] = 'uniqueConstraints={' . $constraints . '}';
1076
+            $table[] = 'uniqueConstraints={'.$constraints.'}';
1077 1077
         }
1078 1078
 
1079 1079
         if (isset($metadata->table['indexes']) && $metadata->table['indexes']) {
1080 1080
             $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']);
1081
-            $table[] = 'indexes={' . $constraints . '}';
1081
+            $table[] = 'indexes={'.$constraints.'}';
1082 1082
         }
1083 1083
 
1084
-        return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
1084
+        return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')';
1085 1085
     }
1086 1086
 
1087 1087
     /**
@@ -1096,9 +1096,9 @@  discard block
 block discarded – undo
1096 1096
         foreach ($constraints as $name => $constraint) {
1097 1097
             $columns = array();
1098 1098
             foreach ($constraint['columns'] as $column) {
1099
-                $columns[] = '"' . $column . '"';
1099
+                $columns[] = '"'.$column.'"';
1100 1100
             }
1101
-            $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
1101
+            $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})';
1102 1102
         }
1103 1103
 
1104 1104
         return implode(', ', $annotations);
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
     protected function generateInheritanceAnnotation($metadata)
1113 1113
     {
1114 1114
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
1115
-            return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1115
+            return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1116 1116
         }
1117 1117
     }
1118 1118
 
@@ -1125,11 +1125,11 @@  discard block
 block discarded – undo
1125 1125
     {
1126 1126
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
1127 1127
             $discrColumn = $metadata->discriminatorColumn;
1128
-            $columnDefinition = 'name="' . $discrColumn['name']
1129
-                . '", type="' . $discrColumn['type']
1130
-                . '", length=' . $discrColumn['length'];
1128
+            $columnDefinition = 'name="'.$discrColumn['name']
1129
+                . '", type="'.$discrColumn['type']
1130
+                . '", length='.$discrColumn['length'];
1131 1131
 
1132
-            return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')';
1132
+            return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')';
1133 1133
         }
1134 1134
     }
1135 1135
 
@@ -1144,10 +1144,10 @@  discard block
 block discarded – undo
1144 1144
             $inheritanceClassMap = array();
1145 1145
 
1146 1146
             foreach ($metadata->discriminatorMap as $type => $class) {
1147
-                $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"';
1147
+                $inheritanceClassMap[] .= '"'.$type.'" = "'.$class.'"';
1148 1148
             }
1149 1149
 
1150
-            return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
1150
+            return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})';
1151 1151
         }
1152 1152
     }
1153 1153
 
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
             if (( ! isset($fieldMapping['id']) ||
1171 1171
                     ! $fieldMapping['id'] ||
1172 1172
                     $metadata->generatorType == ClassMetadataInfo::GENERATOR_TYPE_NONE
1173
-                ) && (! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable)
1173
+                ) && ( ! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable)
1174 1174
             ) {
1175 1175
                 if ($code = $this->generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'])) {
1176 1176
                     $methods[] = $code;
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
         }
1243 1243
 
1244 1244
         foreach ($joinColumns as $joinColumn) {
1245
-            if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) {
1245
+            if (isset($joinColumn['nullable']) && ! $joinColumn['nullable']) {
1246 1246
                 return false;
1247 1247
             }
1248 1248
         }
@@ -1289,8 +1289,8 @@  discard block
 block discarded – undo
1289 1289
             }
1290 1290
 
1291 1291
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1292
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1293
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1292
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$associationMapping['fieldName']
1293
+                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null).";\n";
1294 1294
         }
1295 1295
 
1296 1296
         return implode("\n", $lines);
@@ -1317,8 +1317,8 @@  discard block
 block discarded – undo
1317 1317
             }
1318 1318
 
1319 1319
             $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
1320
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName']
1321
-                     . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1320
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldMapping['fieldName']
1321
+                     . (isset($fieldMapping['options']['default']) ? ' = '.var_export($fieldMapping['options']['default'], true) : null).";\n";
1322 1322
         }
1323 1323
 
1324 1324
         return implode("\n", $lines);
@@ -1339,7 +1339,7 @@  discard block
 block discarded – undo
1339 1339
             }
1340 1340
 
1341 1341
             $lines[] = $this->generateEmbeddedPropertyDocBlock($embeddedClass);
1342
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . ";\n";
1342
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.";\n";
1343 1343
         }
1344 1344
 
1345 1345
         return implode("\n", $lines);
@@ -1354,9 +1354,9 @@  discard block
 block discarded – undo
1354 1354
      *
1355 1355
      * @return string
1356 1356
      */
1357
-    protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null,  $defaultValue = null)
1357
+    protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null)
1358 1358
     {
1359
-        $methodName = $type . Inflector::classify($fieldName);
1359
+        $methodName = $type.Inflector::classify($fieldName);
1360 1360
         $variableName = Inflector::camelize($fieldName);
1361 1361
         if (in_array($type, array("add", "remove"))) {
1362 1362
             $methodName = Inflector::singularize($methodName);
@@ -1376,18 +1376,18 @@  discard block
 block discarded – undo
1376 1376
         $variableType   = $typeHint ? $this->getType($typeHint) : null;
1377 1377
 
1378 1378
         if ($typeHint && ! isset($types[$typeHint])) {
1379
-            $variableType   =  '\\' . ltrim($variableType, '\\');
1380
-            $methodTypeHint =  '\\' . $typeHint . ' ';
1379
+            $variableType   = '\\'.ltrim($variableType, '\\');
1380
+            $methodTypeHint = '\\'.$typeHint.' ';
1381 1381
         }
1382 1382
 
1383 1383
         $replacements = array(
1384
-          '<description>'       => ucfirst($type) . ' ' . $variableName,
1384
+          '<description>'       => ucfirst($type).' '.$variableName,
1385 1385
           '<methodTypeHint>'    => $methodTypeHint,
1386 1386
           '<variableType>'      => $variableType,
1387 1387
           '<variableName>'      => $variableName,
1388 1388
           '<methodName>'        => $methodName,
1389 1389
           '<fieldName>'         => $fieldName,
1390
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1390
+          '<variableDefault>'   => ($defaultValue !== null) ? (' = '.$defaultValue) : '',
1391 1391
           '<entity>'            => $this->getClassName($metadata)
1392 1392
         );
1393 1393
 
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
         $this->staticReflection[$metadata->name]['methods'][] = $methodName;
1416 1416
 
1417 1417
         $replacements = array(
1418
-            '<name>'        => $this->annotationsPrefix . ucfirst($name),
1418
+            '<name>'        => $this->annotationsPrefix.ucfirst($name),
1419 1419
             '<methodName>'  => $methodName,
1420 1420
         );
1421 1421
 
@@ -1438,30 +1438,30 @@  discard block
 block discarded – undo
1438 1438
         $joinColumnAnnot = array();
1439 1439
 
1440 1440
         if (isset($joinColumn['name'])) {
1441
-            $joinColumnAnnot[] = 'name="' . $joinColumn['name'] . '"';
1441
+            $joinColumnAnnot[] = 'name="'.$joinColumn['name'].'"';
1442 1442
         }
1443 1443
 
1444 1444
         if (isset($joinColumn['referencedColumnName'])) {
1445
-            $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn['referencedColumnName'] . '"';
1445
+            $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn['referencedColumnName'].'"';
1446 1446
         }
1447 1447
 
1448 1448
         if (isset($joinColumn['unique']) && $joinColumn['unique']) {
1449
-            $joinColumnAnnot[] = 'unique=' . ($joinColumn['unique'] ? 'true' : 'false');
1449
+            $joinColumnAnnot[] = 'unique='.($joinColumn['unique'] ? 'true' : 'false');
1450 1450
         }
1451 1451
 
1452 1452
         if (isset($joinColumn['nullable'])) {
1453
-            $joinColumnAnnot[] = 'nullable=' . ($joinColumn['nullable'] ? 'true' : 'false');
1453
+            $joinColumnAnnot[] = 'nullable='.($joinColumn['nullable'] ? 'true' : 'false');
1454 1454
         }
1455 1455
 
1456 1456
         if (isset($joinColumn['onDelete'])) {
1457
-            $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"');
1457
+            $joinColumnAnnot[] = 'onDelete="'.($joinColumn['onDelete'].'"');
1458 1458
         }
1459 1459
 
1460 1460
         if (isset($joinColumn['columnDefinition'])) {
1461
-            $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"';
1461
+            $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn['columnDefinition'].'"';
1462 1462
         }
1463 1463
 
1464
-        return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
1464
+        return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')';
1465 1465
     }
1466 1466
 
1467 1467
     /**
@@ -1473,22 +1473,22 @@  discard block
 block discarded – undo
1473 1473
     protected function generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadataInfo $metadata)
1474 1474
     {
1475 1475
         $lines = array();
1476
-        $lines[] = $this->spaces . '/**';
1476
+        $lines[] = $this->spaces.'/**';
1477 1477
 
1478 1478
         if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
1479
-            $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection';
1479
+            $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection';
1480 1480
         } else {
1481
-            $lines[] = $this->spaces . ' * @var \\' . ltrim($associationMapping['targetEntity'], '\\');
1481
+            $lines[] = $this->spaces.' * @var \\'.ltrim($associationMapping['targetEntity'], '\\');
1482 1482
         }
1483 1483
 
1484 1484
         if ($this->generateAnnotations) {
1485
-            $lines[] = $this->spaces . ' *';
1485
+            $lines[] = $this->spaces.' *';
1486 1486
 
1487 1487
             if (isset($associationMapping['id']) && $associationMapping['id']) {
1488
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1488
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1489 1489
 
1490 1490
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1491
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1491
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1492 1492
                 }
1493 1493
             }
1494 1494
 
@@ -1510,15 +1510,15 @@  discard block
 block discarded – undo
1510 1510
             $typeOptions = array();
1511 1511
 
1512 1512
             if (isset($associationMapping['targetEntity'])) {
1513
-                $typeOptions[] = 'targetEntity="' . $associationMapping['targetEntity'] . '"';
1513
+                $typeOptions[] = 'targetEntity="'.$associationMapping['targetEntity'].'"';
1514 1514
             }
1515 1515
 
1516 1516
             if (isset($associationMapping['inversedBy'])) {
1517
-                $typeOptions[] = 'inversedBy="' . $associationMapping['inversedBy'] . '"';
1517
+                $typeOptions[] = 'inversedBy="'.$associationMapping['inversedBy'].'"';
1518 1518
             }
1519 1519
 
1520 1520
             if (isset($associationMapping['mappedBy'])) {
1521
-                $typeOptions[] = 'mappedBy="' . $associationMapping['mappedBy'] . '"';
1521
+                $typeOptions[] = 'mappedBy="'.$associationMapping['mappedBy'].'"';
1522 1522
             }
1523 1523
 
1524 1524
             if ($associationMapping['cascade']) {
@@ -1534,11 +1534,11 @@  discard block
 block discarded – undo
1534 1534
                     $cascades = array('"all"');
1535 1535
                 }
1536 1536
 
1537
-                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
1537
+                $typeOptions[] = 'cascade={'.implode(',', $cascades).'}';
1538 1538
             }
1539 1539
 
1540 1540
             if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) {
1541
-                $typeOptions[] = 'orphanRemoval=' . ($associationMapping['orphanRemoval'] ? 'true' : 'false');
1541
+                $typeOptions[] = 'orphanRemoval='.($associationMapping['orphanRemoval'] ? 'true' : 'false');
1542 1542
             }
1543 1543
 
1544 1544
             if (isset($associationMapping['fetch']) && $associationMapping['fetch'] !== ClassMetadataInfo::FETCH_LAZY) {
@@ -1547,71 +1547,71 @@  discard block
 block discarded – undo
1547 1547
                     ClassMetadataInfo::FETCH_EAGER      => 'EAGER',
1548 1548
                 );
1549 1549
 
1550
-                $typeOptions[] = 'fetch="' . $fetchMap[$associationMapping['fetch']] . '"';
1550
+                $typeOptions[] = 'fetch="'.$fetchMap[$associationMapping['fetch']].'"';
1551 1551
             }
1552 1552
 
1553
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')';
1553
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')';
1554 1554
 
1555 1555
             if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) {
1556
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({';
1556
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({';
1557 1557
 
1558 1558
                 $joinColumnsLines = array();
1559 1559
 
1560 1560
                 foreach ($associationMapping['joinColumns'] as $joinColumn) {
1561 1561
                     if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) {
1562
-                        $joinColumnsLines[] = $this->spaces . ' *   ' . $joinColumnAnnot;
1562
+                        $joinColumnsLines[] = $this->spaces.' *   '.$joinColumnAnnot;
1563 1563
                     }
1564 1564
                 }
1565 1565
 
1566 1566
                 $lines[] = implode(",\n", $joinColumnsLines);
1567
-                $lines[] = $this->spaces . ' * })';
1567
+                $lines[] = $this->spaces.' * })';
1568 1568
             }
1569 1569
 
1570 1570
             if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) {
1571 1571
                 $joinTable = array();
1572
-                $joinTable[] = 'name="' . $associationMapping['joinTable']['name'] . '"';
1572
+                $joinTable[] = 'name="'.$associationMapping['joinTable']['name'].'"';
1573 1573
 
1574 1574
                 if (isset($associationMapping['joinTable']['schema'])) {
1575
-                    $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"';
1575
+                    $joinTable[] = 'schema="'.$associationMapping['joinTable']['schema'].'"';
1576 1576
                 }
1577 1577
 
1578
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ',';
1579
-                $lines[] = $this->spaces . ' *   joinColumns={';
1578
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTable).',';
1579
+                $lines[] = $this->spaces.' *   joinColumns={';
1580 1580
 
1581 1581
                 $joinColumnsLines = array();
1582 1582
 
1583 1583
                 foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) {
1584
-                    $joinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1584
+                    $joinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1585 1585
                 }
1586 1586
 
1587
-                $lines[] = implode(",". PHP_EOL, $joinColumnsLines);
1588
-                $lines[] = $this->spaces . ' *   },';
1589
-                $lines[] = $this->spaces . ' *   inverseJoinColumns={';
1587
+                $lines[] = implode(",".PHP_EOL, $joinColumnsLines);
1588
+                $lines[] = $this->spaces.' *   },';
1589
+                $lines[] = $this->spaces.' *   inverseJoinColumns={';
1590 1590
 
1591 1591
                 $inverseJoinColumnsLines = array();
1592 1592
 
1593 1593
                 foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $joinColumn) {
1594
-                    $inverseJoinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1594
+                    $inverseJoinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1595 1595
                 }
1596 1596
 
1597
-                $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines);
1598
-                $lines[] = $this->spaces . ' *   }';
1599
-                $lines[] = $this->spaces . ' * )';
1597
+                $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines);
1598
+                $lines[] = $this->spaces.' *   }';
1599
+                $lines[] = $this->spaces.' * )';
1600 1600
             }
1601 1601
 
1602 1602
             if (isset($associationMapping['orderBy'])) {
1603
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({';
1603
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({';
1604 1604
 
1605 1605
                 foreach ($associationMapping['orderBy'] as $name => $direction) {
1606
-                    $lines[] = $this->spaces . ' *     "' . $name . '"="' . $direction . '",';
1606
+                    $lines[] = $this->spaces.' *     "'.$name.'"="'.$direction.'",';
1607 1607
                 }
1608 1608
 
1609 1609
                 $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1);
1610
-                $lines[] = $this->spaces . ' * })';
1610
+                $lines[] = $this->spaces.' * })';
1611 1611
             }
1612 1612
         }
1613 1613
 
1614
-        $lines[] = $this->spaces . ' */';
1614
+        $lines[] = $this->spaces.' */';
1615 1615
 
1616 1616
         return implode("\n", $lines);
1617 1617
     }
@@ -1625,35 +1625,35 @@  discard block
 block discarded – undo
1625 1625
     protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, ClassMetadataInfo $metadata)
1626 1626
     {
1627 1627
         $lines = array();
1628
-        $lines[] = $this->spaces . '/**';
1629
-        $lines[] = $this->spaces . ' * @var ' . $this->getType($fieldMapping['type']);
1628
+        $lines[] = $this->spaces.'/**';
1629
+        $lines[] = $this->spaces.' * @var '.$this->getType($fieldMapping['type']);
1630 1630
 
1631 1631
         if ($this->generateAnnotations) {
1632
-            $lines[] = $this->spaces . ' *';
1632
+            $lines[] = $this->spaces.' *';
1633 1633
 
1634 1634
             $column = array();
1635 1635
             if (isset($fieldMapping['columnName'])) {
1636
-                $column[] = 'name="' . $fieldMapping['columnName'] . '"';
1636
+                $column[] = 'name="'.$fieldMapping['columnName'].'"';
1637 1637
             }
1638 1638
 
1639 1639
             if (isset($fieldMapping['type'])) {
1640
-                $column[] = 'type="' . $fieldMapping['type'] . '"';
1640
+                $column[] = 'type="'.$fieldMapping['type'].'"';
1641 1641
             }
1642 1642
 
1643 1643
             if (isset($fieldMapping['length'])) {
1644
-                $column[] = 'length=' . $fieldMapping['length'];
1644
+                $column[] = 'length='.$fieldMapping['length'];
1645 1645
             }
1646 1646
 
1647 1647
             if (isset($fieldMapping['precision'])) {
1648
-                $column[] = 'precision=' .  $fieldMapping['precision'];
1648
+                $column[] = 'precision='.$fieldMapping['precision'];
1649 1649
             }
1650 1650
 
1651 1651
             if (isset($fieldMapping['scale'])) {
1652
-                $column[] = 'scale=' . $fieldMapping['scale'];
1652
+                $column[] = 'scale='.$fieldMapping['scale'];
1653 1653
             }
1654 1654
 
1655 1655
             if (isset($fieldMapping['nullable'])) {
1656
-                $column[] = 'nullable=' .  var_export($fieldMapping['nullable'], true);
1656
+                $column[] = 'nullable='.var_export($fieldMapping['nullable'], true);
1657 1657
             }
1658 1658
 
1659 1659
             $options = [];
@@ -1667,47 +1667,47 @@  discard block
 block discarded – undo
1667 1667
             }
1668 1668
 
1669 1669
             if (isset($fieldMapping['columnDefinition'])) {
1670
-                $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"';
1670
+                $column[] = 'columnDefinition="'.$fieldMapping['columnDefinition'].'"';
1671 1671
             }
1672 1672
 
1673 1673
             if (isset($fieldMapping['unique'])) {
1674
-                $column[] = 'unique=' . var_export($fieldMapping['unique'], true);
1674
+                $column[] = 'unique='.var_export($fieldMapping['unique'], true);
1675 1675
             }
1676 1676
 
1677
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')';
1677
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')';
1678 1678
 
1679 1679
             if (isset($fieldMapping['id']) && $fieldMapping['id']) {
1680
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1680
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1681 1681
 
1682 1682
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1683
-                    $lines[] = $this->spaces.' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1683
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1684 1684
                 }
1685 1685
 
1686 1686
                 if ($metadata->sequenceGeneratorDefinition) {
1687 1687
                     $sequenceGenerator = array();
1688 1688
 
1689 1689
                     if (isset($metadata->sequenceGeneratorDefinition['sequenceName'])) {
1690
-                        $sequenceGenerator[] = 'sequenceName="' . $metadata->sequenceGeneratorDefinition['sequenceName'] . '"';
1690
+                        $sequenceGenerator[] = 'sequenceName="'.$metadata->sequenceGeneratorDefinition['sequenceName'].'"';
1691 1691
                     }
1692 1692
 
1693 1693
                     if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) {
1694
-                        $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize'];
1694
+                        $sequenceGenerator[] = 'allocationSize='.$metadata->sequenceGeneratorDefinition['allocationSize'];
1695 1695
                     }
1696 1696
 
1697 1697
                     if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) {
1698
-                        $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue'];
1698
+                        $sequenceGenerator[] = 'initialValue='.$metadata->sequenceGeneratorDefinition['initialValue'];
1699 1699
                     }
1700 1700
 
1701
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')';
1701
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $sequenceGenerator).')';
1702 1702
                 }
1703 1703
             }
1704 1704
 
1705 1705
             if (isset($fieldMapping['version']) && $fieldMapping['version']) {
1706
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version';
1706
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version';
1707 1707
             }
1708 1708
         }
1709 1709
 
1710
-        $lines[] = $this->spaces . ' */';
1710
+        $lines[] = $this->spaces.' */';
1711 1711
 
1712 1712
         return implode("\n", $lines);
1713 1713
     }
@@ -1720,23 +1720,23 @@  discard block
 block discarded – undo
1720 1720
     protected function generateEmbeddedPropertyDocBlock(array $embeddedClass)
1721 1721
     {
1722 1722
         $lines = array();
1723
-        $lines[] = $this->spaces . '/**';
1724
-        $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\');
1723
+        $lines[] = $this->spaces.'/**';
1724
+        $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\');
1725 1725
 
1726 1726
         if ($this->generateAnnotations) {
1727
-            $lines[] = $this->spaces . ' *';
1727
+            $lines[] = $this->spaces.' *';
1728 1728
 
1729
-            $embedded = array('class="' . $embeddedClass['class'] . '"');
1729
+            $embedded = array('class="'.$embeddedClass['class'].'"');
1730 1730
 
1731 1731
             if (isset($fieldMapping['columnPrefix'])) {
1732
-                $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true);
1732
+                $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true);
1733 1733
             }
1734 1734
 
1735
-            $lines[] = $this->spaces . ' * @' .
1736
-                $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')';
1735
+            $lines[] = $this->spaces.' * @'.
1736
+                $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')';
1737 1737
         }
1738 1738
 
1739
-        $lines[] = $this->spaces . ' */';
1739
+        $lines[] = $this->spaces.' */';
1740 1740
 
1741 1741
         return implode("\n", $lines);
1742 1742
     }
@@ -1753,7 +1753,7 @@  discard block
 block discarded – undo
1753 1753
 
1754 1754
         foreach ($lines as $key => $value) {
1755 1755
             if ( ! empty($value)) {
1756
-                $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
1756
+                $lines[$key] = str_repeat($this->spaces, $num).$lines[$key];
1757 1757
             }
1758 1758
         }
1759 1759
 
@@ -1821,9 +1821,9 @@  discard block
 block discarded – undo
1821 1821
 
1822 1822
         foreach ($options as $name => $option) {
1823 1823
             if (is_array($option)) {
1824
-                $optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}';
1824
+                $optionsStr[] = '"'.$name.'"={'.$this->exportTableOptions($option).'}';
1825 1825
             } else {
1826
-                $optionsStr[] = '"' . $name . '"="' . (string) $option . '"';
1826
+                $optionsStr[] = '"'.$name.'"="'.(string) $option.'"';
1827 1827
             }
1828 1828
         }
1829 1829
 
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1524,11 +1524,21 @@
 block discarded – undo
1524 1524
             if ($associationMapping['cascade']) {
1525 1525
                 $cascades = array();
1526 1526
 
1527
-                if ($associationMapping['isCascadePersist']) $cascades[] = '"persist"';
1528
-                if ($associationMapping['isCascadeRemove']) $cascades[] = '"remove"';
1529
-                if ($associationMapping['isCascadeDetach']) $cascades[] = '"detach"';
1530
-                if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"';
1531
-                if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"';
1527
+                if ($associationMapping['isCascadePersist']) {
1528
+                    $cascades[] = '"persist"';
1529
+                }
1530
+                if ($associationMapping['isCascadeRemove']) {
1531
+                    $cascades[] = '"remove"';
1532
+                }
1533
+                if ($associationMapping['isCascadeDetach']) {
1534
+                    $cascades[] = '"detach"';
1535
+                }
1536
+                if ($associationMapping['isCascadeMerge']) {
1537
+                    $cascades[] = '"merge"';
1538
+                }
1539
+                if ($associationMapping['isCascadeRefresh']) {
1540
+                    $cascades[] = '"refresh"';
1541
+                }
1532 1542
 
1533 1543
                 if (count($cascades) === 5) {
1534 1544
                     $cascades = array('"all"');
Please login to merge, or discard this patch.