Completed
Push — master ( a9230b...be1fd1 )
by Marco
18:14 queued 08:51
created
lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 block discarded – undo
58 58
         $entityManager = $this->getHelper('em')->getEntityManager();
59 59
 
60 60
         $entityClassNames = $entityManager->getConfiguration()
61
-                                          ->getMetadataDriverImpl()
62
-                                          ->getAllClassNames();
61
+                                            ->getMetadataDriverImpl()
62
+                                            ->getAllClassNames();
63 63
 
64 64
         if (!$entityClassNames) {
65 65
             throw new \Exception(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
                                           ->getMetadataDriverImpl()
62 62
                                           ->getAllClassNames();
63 63
 
64
-        if (!$entityClassNames) {
64
+        if ( ! $entityClassNames) {
65 65
             throw new \Exception(
66 66
                 'You do not have any mapped Doctrine ORM entities according to the current configuration. '.
67 67
                 'If you have entities or mapping files you should check your mapping configuration for errors.'
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 
111 111
             if ($numRepositories) {
112 112
                 // Outputting information message
113
-                $output->writeln(PHP_EOL . sprintf('Repository classes generated to "<info>%s</INFO>"', $destPath));
113
+                $output->writeln(PHP_EOL.sprintf('Repository classes generated to "<info>%s</INFO>"', $destPath));
114 114
             } else {
115 115
                 $output->writeln('No Repository classes were found to be processed.');
116 116
             }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             } else {
87 87
                 $sqls = $schemaTool->getDropSchemaSQL($metadatas);
88 88
             }
89
-            $output->writeln(implode(';' . PHP_EOL, $sqls));
89
+            $output->writeln(implode(';'.PHP_EOL, $sqls));
90 90
 
91 91
             return 0;
92 92
         }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             return 0;
106 106
         }
107 107
 
108
-        $output->writeln('<comment>ATTENTION</comment>: This operation should not be executed in a production environment.' . PHP_EOL);
108
+        $output->writeln('<comment>ATTENTION</comment>: This operation should not be executed in a production environment.'.PHP_EOL);
109 109
 
110 110
         if ($isFullDatabaseDrop) {
111 111
             $sqls = $schemaTool->getDropDatabaseSQL();
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@
 block discarded – undo
71 71
     {
72 72
         if ($input->getOption('dump-sql')) {
73 73
             $sqls = $schemaTool->getCreateSchemaSql($metadatas);
74
-            $output->writeln(implode(';' . PHP_EOL, $sqls) . ';');
74
+            $output->writeln(implode(';'.PHP_EOL, $sqls).';');
75 75
         } else {
76
-            $output->writeln('ATTENTION: This operation should not be executed in a production environment.' . PHP_EOL);
76
+            $output->writeln('ATTENTION: This operation should not be executed in a production environment.'.PHP_EOL);
77 77
 
78 78
             $output->writeln('Creating database schema...');
79 79
             $schemaTool->createSchema($metadatas);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
         $force   = true === $input->getOption('force');
123 123
 
124 124
         if ($dumpSql) {
125
-            $output->writeln(implode(';' . PHP_EOL, $sqls) . ';');
125
+            $output->writeln(implode(';'.PHP_EOL, $sqls).';');
126 126
         }
127 127
 
128 128
         if ($force) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@
 block discarded – undo
220 220
             $exporter->setMetadata($metadata);
221 221
             $exporter->export();
222 222
 
223
-            $output->writeln(PHP_EOL . sprintf(
223
+            $output->writeln(PHP_EOL.sprintf(
224 224
                 'Converting Doctrine 1.X schema to "<info>%s</info>" mapping type in "<info>%s</info>"', $toType, $destPath
225 225
             ));
226 226
         } else {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
                 $em->getConnection()->connect();
72 72
             }
73 73
         } catch (\Exception $e) {
74
-            $output->writeln('<error>' . $e->getMessage() . '</error>');
74
+            $output->writeln('<error>'.$e->getMessage().'</error>');
75 75
 
76 76
             return 1;
77 77
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/EntityGenerator.php 3 patches
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.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1291,7 +1291,7 @@  discard block
 block discarded – undo
1291 1291
 
1292 1292
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1293 1293
             $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1294
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1294
+                        . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1295 1295
         }
1296 1296
 
1297 1297
         return implode("\n", $lines);
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
 
1320 1320
             $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
1321 1321
             $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName']
1322
-                     . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1322
+                        . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1323 1323
         }
1324 1324
 
1325 1325
         return implode("\n", $lines);
@@ -1382,14 +1382,14 @@  discard block
 block discarded – undo
1382 1382
         }
1383 1383
 
1384 1384
         $replacements = array(
1385
-          '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1386
-          '<methodTypeHint>'    => $methodTypeHint,
1387
-          '<variableType>'      => $variableType,
1388
-          '<variableName>'      => $variableName,
1389
-          '<methodName>'        => $methodName,
1390
-          '<fieldName>'         => $fieldName,
1391
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1392
-          '<entity>'            => $this->getClassName($metadata)
1385
+            '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1386
+            '<methodTypeHint>'    => $methodTypeHint,
1387
+            '<variableType>'      => $variableType,
1388
+            '<variableName>'      => $variableName,
1389
+            '<methodName>'        => $methodName,
1390
+            '<fieldName>'         => $fieldName,
1391
+            '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1392
+            '<entity>'            => $this->getClassName($metadata)
1393 1393
         );
1394 1394
 
1395 1395
         $method = str_replace(
Please login to merge, or discard this patch.
Spacing   +141 added lines, -141 removed lines patch added patch discarded remove patch
@@ -364,7 +364,7 @@  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)) {
@@ -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 . ($body ? "\n" : '') . "}\n";
445
+        return substr($currentCode, 0, $last).$body.($body ? "\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(
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 
826 826
             if ($inClass) {
827 827
                 $inClass = false;
828
-                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
828
+                $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1];
829 829
                 $this->staticReflection[$lastSeenClass]['properties'] = array();
830 830
                 $this->staticReflection[$lastSeenClass]['methods'] = array();
831 831
             }
@@ -833,16 +833,16 @@  discard block
 block discarded – undo
833 833
             if (T_NAMESPACE === $token[0]) {
834 834
                 $lastSeenNamespace = '';
835 835
                 $inNamespace = true;
836
-            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i-1][0]) {
836
+            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i - 1][0]) {
837 837
                 $inClass = true;
838 838
             } elseif (T_FUNCTION === $token[0]) {
839
-                if (T_STRING === $tokens[$i+2][0]) {
840
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]);
841
-                } elseif ($tokens[$i+2] == '&' && T_STRING === $tokens[$i+3][0]) {
842
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]);
839
+                if (T_STRING === $tokens[$i + 2][0]) {
840
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]);
841
+                } elseif ($tokens[$i + 2] == '&' && T_STRING === $tokens[$i + 3][0]) {
842
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]);
843 843
                 }
844
-            } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED), true) && T_FUNCTION !== $tokens[$i+2][0]) {
845
-                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1);
844
+            } elseif (in_array($token[0], array(T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED), true) && T_FUNCTION !== $tokens[$i + 2][0]) {
845
+                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1);
846 846
             }
847 847
         }
848 848
     }
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
      */
856 856
     protected function hasProperty($property, ClassMetadataInfo $metadata)
857 857
     {
858
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
858
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
859 859
             // don't generate property if its already on the base class.
860 860
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
861 861
             if ($reflClass->hasProperty($property)) {
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
      */
885 885
     protected function hasMethod($method, ClassMetadataInfo $metadata)
886 886
     {
887
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->name))) {
887
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->name))) {
888 888
             // don't generate method if its already on the base class.
889 889
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->name);
890 890
 
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
      */
914 914
     protected function getTraits(ClassMetadataInfo $metadata)
915 915
     {
916
-        if (! ($metadata->reflClass !== null || class_exists($metadata->name))) {
916
+        if ( ! ($metadata->reflClass !== null || class_exists($metadata->name))) {
917 917
             return [];
918 918
         }
919 919
 
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
     {
966 966
         $refl = new \ReflectionClass($this->getClassToExtend());
967 967
 
968
-        return '\\' . $refl->getName();
968
+        return '\\'.$refl->getName();
969 969
     }
970 970
 
971 971
     /**
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
     {
999 999
         $lines = array();
1000 1000
         $lines[] = '/**';
1001
-        $lines[] = ' * ' . $this->getClassName($metadata);
1001
+        $lines[] = ' * '.$this->getClassName($metadata);
1002 1002
 
1003 1003
         if ($this->generateAnnotations) {
1004 1004
             $lines[] = ' *';
@@ -1013,12 +1013,12 @@  discard block
 block discarded – undo
1013 1013
 
1014 1014
             foreach ($methods as $method) {
1015 1015
                 if ($code = $this->$method($metadata)) {
1016
-                    $lines[] = ' * ' . $code;
1016
+                    $lines[] = ' * '.$code;
1017 1017
                 }
1018 1018
             }
1019 1019
 
1020 1020
             if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
1021
-                $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks';
1021
+                $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks';
1022 1022
             }
1023 1023
         }
1024 1024
 
@@ -1034,17 +1034,17 @@  discard block
 block discarded – undo
1034 1034
      */
1035 1035
     protected function generateEntityAnnotation(ClassMetadataInfo $metadata)
1036 1036
     {
1037
-        $prefix = '@' . $this->annotationsPrefix;
1037
+        $prefix = '@'.$this->annotationsPrefix;
1038 1038
 
1039 1039
         if ($metadata->isEmbeddedClass) {
1040
-            return $prefix . 'Embeddable';
1040
+            return $prefix.'Embeddable';
1041 1041
         }
1042 1042
 
1043 1043
         $customRepository = $metadata->customRepositoryClassName
1044
-            ? '(repositoryClass="' . $metadata->customRepositoryClassName . '")'
1044
+            ? '(repositoryClass="'.$metadata->customRepositoryClassName.'")'
1045 1045
             : '';
1046 1046
 
1047
-        return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository;
1047
+        return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository;
1048 1048
     }
1049 1049
 
1050 1050
     /**
@@ -1061,28 +1061,28 @@  discard block
 block discarded – undo
1061 1061
         $table = array();
1062 1062
 
1063 1063
         if (isset($metadata->table['schema'])) {
1064
-            $table[] = 'schema="' . $metadata->table['schema'] . '"';
1064
+            $table[] = 'schema="'.$metadata->table['schema'].'"';
1065 1065
         }
1066 1066
 
1067 1067
         if (isset($metadata->table['name'])) {
1068
-            $table[] = 'name="' . $metadata->table['name'] . '"';
1068
+            $table[] = 'name="'.$metadata->table['name'].'"';
1069 1069
         }
1070 1070
 
1071 1071
         if (isset($metadata->table['options']) && $metadata->table['options']) {
1072
-            $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}';
1072
+            $table[] = 'options={'.$this->exportTableOptions((array) $metadata->table['options']).'}';
1073 1073
         }
1074 1074
 
1075 1075
         if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
1076 1076
             $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']);
1077
-            $table[] = 'uniqueConstraints={' . $constraints . '}';
1077
+            $table[] = 'uniqueConstraints={'.$constraints.'}';
1078 1078
         }
1079 1079
 
1080 1080
         if (isset($metadata->table['indexes']) && $metadata->table['indexes']) {
1081 1081
             $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']);
1082
-            $table[] = 'indexes={' . $constraints . '}';
1082
+            $table[] = 'indexes={'.$constraints.'}';
1083 1083
         }
1084 1084
 
1085
-        return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
1085
+        return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')';
1086 1086
     }
1087 1087
 
1088 1088
     /**
@@ -1097,9 +1097,9 @@  discard block
 block discarded – undo
1097 1097
         foreach ($constraints as $name => $constraint) {
1098 1098
             $columns = array();
1099 1099
             foreach ($constraint['columns'] as $column) {
1100
-                $columns[] = '"' . $column . '"';
1100
+                $columns[] = '"'.$column.'"';
1101 1101
             }
1102
-            $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
1102
+            $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})';
1103 1103
         }
1104 1104
 
1105 1105
         return implode(', ', $annotations);
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
     protected function generateInheritanceAnnotation(ClassMetadataInfo $metadata)
1114 1114
     {
1115 1115
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
1116
-            return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1116
+            return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1117 1117
         }
1118 1118
     }
1119 1119
 
@@ -1126,11 +1126,11 @@  discard block
 block discarded – undo
1126 1126
     {
1127 1127
         if ($metadata->inheritanceType != ClassMetadataInfo::INHERITANCE_TYPE_NONE) {
1128 1128
             $discrColumn = $metadata->discriminatorColumn;
1129
-            $columnDefinition = 'name="' . $discrColumn['name']
1130
-                . '", type="' . $discrColumn['type']
1131
-                . '", length=' . $discrColumn['length'];
1129
+            $columnDefinition = 'name="'.$discrColumn['name']
1130
+                . '", type="'.$discrColumn['type']
1131
+                . '", length='.$discrColumn['length'];
1132 1132
 
1133
-            return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')';
1133
+            return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')';
1134 1134
         }
1135 1135
     }
1136 1136
 
@@ -1145,10 +1145,10 @@  discard block
 block discarded – undo
1145 1145
             $inheritanceClassMap = array();
1146 1146
 
1147 1147
             foreach ($metadata->discriminatorMap as $type => $class) {
1148
-                $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"';
1148
+                $inheritanceClassMap[] .= '"'.$type.'" = "'.$class.'"';
1149 1149
             }
1150 1150
 
1151
-            return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
1151
+            return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})';
1152 1152
         }
1153 1153
     }
1154 1154
 
@@ -1171,7 +1171,7 @@  discard block
 block discarded – undo
1171 1171
             if (( ! isset($fieldMapping['id']) ||
1172 1172
                     ! $fieldMapping['id'] ||
1173 1173
                     $metadata->generatorType == ClassMetadataInfo::GENERATOR_TYPE_NONE
1174
-                ) && (! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable)
1174
+                ) && ( ! $metadata->isEmbeddedClass || ! $this->embeddablesImmutable)
1175 1175
             ) {
1176 1176
                 if ($code = $this->generateEntityStubMethod($metadata, 'set', $fieldMapping['fieldName'], $fieldMapping['type'])) {
1177 1177
                     $methods[] = $code;
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
         }
1244 1244
 
1245 1245
         foreach ($joinColumns as $joinColumn) {
1246
-            if (isset($joinColumn['nullable']) && !$joinColumn['nullable']) {
1246
+            if (isset($joinColumn['nullable']) && ! $joinColumn['nullable']) {
1247 1247
                 return false;
1248 1248
             }
1249 1249
         }
@@ -1290,8 +1290,8 @@  discard block
 block discarded – undo
1290 1290
             }
1291 1291
 
1292 1292
             $lines[] = $this->generateAssociationMappingPropertyDocBlock($associationMapping, $metadata);
1293
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $associationMapping['fieldName']
1294
-                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null) . ";\n";
1293
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$associationMapping['fieldName']
1294
+                     . ($associationMapping['type'] == 'manyToMany' ? ' = array()' : null).";\n";
1295 1295
         }
1296 1296
 
1297 1297
         return implode("\n", $lines);
@@ -1318,8 +1318,8 @@  discard block
 block discarded – undo
1318 1318
             }
1319 1319
 
1320 1320
             $lines[] = $this->generateFieldMappingPropertyDocBlock($fieldMapping, $metadata);
1321
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldMapping['fieldName']
1322
-                     . (isset($fieldMapping['options']['default']) ? ' = ' . var_export($fieldMapping['options']['default'], true) : null) . ";\n";
1321
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldMapping['fieldName']
1322
+                     . (isset($fieldMapping['options']['default']) ? ' = '.var_export($fieldMapping['options']['default'], true) : null).";\n";
1323 1323
         }
1324 1324
 
1325 1325
         return implode("\n", $lines);
@@ -1340,7 +1340,7 @@  discard block
 block discarded – undo
1340 1340
             }
1341 1341
 
1342 1342
             $lines[] = $this->generateEmbeddedPropertyDocBlock($embeddedClass);
1343
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . ";\n";
1343
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.";\n";
1344 1344
         }
1345 1345
 
1346 1346
         return implode("\n", $lines);
@@ -1355,9 +1355,9 @@  discard block
 block discarded – undo
1355 1355
      *
1356 1356
      * @return string
1357 1357
      */
1358
-    protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null,  $defaultValue = null)
1358
+    protected function generateEntityStubMethod(ClassMetadataInfo $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null)
1359 1359
     {
1360
-        $methodName = $type . Inflector::classify($fieldName);
1360
+        $methodName = $type.Inflector::classify($fieldName);
1361 1361
         $variableName = Inflector::camelize($fieldName);
1362 1362
         if (in_array($type, array("add", "remove"))) {
1363 1363
             $methodName = Inflector::singularize($methodName);
@@ -1377,18 +1377,18 @@  discard block
 block discarded – undo
1377 1377
         $variableType   = $typeHint ? $this->getType($typeHint) : null;
1378 1378
 
1379 1379
         if ($typeHint && ! isset($types[$typeHint])) {
1380
-            $variableType   =  '\\' . ltrim($variableType, '\\');
1381
-            $methodTypeHint =  '\\' . $typeHint . ' ';
1380
+            $variableType   = '\\'.ltrim($variableType, '\\');
1381
+            $methodTypeHint = '\\'.$typeHint.' ';
1382 1382
         }
1383 1383
 
1384 1384
         $replacements = array(
1385
-          '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1385
+          '<description>'       => ucfirst($type).' '.$variableName.'.',
1386 1386
           '<methodTypeHint>'    => $methodTypeHint,
1387 1387
           '<variableType>'      => $variableType,
1388 1388
           '<variableName>'      => $variableName,
1389 1389
           '<methodName>'        => $methodName,
1390 1390
           '<fieldName>'         => $fieldName,
1391
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = '.$defaultValue) : '',
1391
+          '<variableDefault>'   => ($defaultValue !== null) ? (' = '.$defaultValue) : '',
1392 1392
           '<entity>'            => $this->getClassName($metadata)
1393 1393
         );
1394 1394
 
@@ -1416,7 +1416,7 @@  discard block
 block discarded – undo
1416 1416
         $this->staticReflection[$metadata->name]['methods'][] = $methodName;
1417 1417
 
1418 1418
         $replacements = array(
1419
-            '<name>'        => $this->annotationsPrefix . ucfirst($name),
1419
+            '<name>'        => $this->annotationsPrefix.ucfirst($name),
1420 1420
             '<methodName>'  => $methodName,
1421 1421
         );
1422 1422
 
@@ -1439,30 +1439,30 @@  discard block
 block discarded – undo
1439 1439
         $joinColumnAnnot = array();
1440 1440
 
1441 1441
         if (isset($joinColumn['name'])) {
1442
-            $joinColumnAnnot[] = 'name="' . $joinColumn['name'] . '"';
1442
+            $joinColumnAnnot[] = 'name="'.$joinColumn['name'].'"';
1443 1443
         }
1444 1444
 
1445 1445
         if (isset($joinColumn['referencedColumnName'])) {
1446
-            $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn['referencedColumnName'] . '"';
1446
+            $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn['referencedColumnName'].'"';
1447 1447
         }
1448 1448
 
1449 1449
         if (isset($joinColumn['unique']) && $joinColumn['unique']) {
1450
-            $joinColumnAnnot[] = 'unique=' . ($joinColumn['unique'] ? 'true' : 'false');
1450
+            $joinColumnAnnot[] = 'unique='.($joinColumn['unique'] ? 'true' : 'false');
1451 1451
         }
1452 1452
 
1453 1453
         if (isset($joinColumn['nullable'])) {
1454
-            $joinColumnAnnot[] = 'nullable=' . ($joinColumn['nullable'] ? 'true' : 'false');
1454
+            $joinColumnAnnot[] = 'nullable='.($joinColumn['nullable'] ? 'true' : 'false');
1455 1455
         }
1456 1456
 
1457 1457
         if (isset($joinColumn['onDelete'])) {
1458
-            $joinColumnAnnot[] = 'onDelete="' . ($joinColumn['onDelete'] . '"');
1458
+            $joinColumnAnnot[] = 'onDelete="'.($joinColumn['onDelete'].'"');
1459 1459
         }
1460 1460
 
1461 1461
         if (isset($joinColumn['columnDefinition'])) {
1462
-            $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn['columnDefinition'] . '"';
1462
+            $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn['columnDefinition'].'"';
1463 1463
         }
1464 1464
 
1465
-        return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
1465
+        return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')';
1466 1466
     }
1467 1467
 
1468 1468
     /**
@@ -1474,22 +1474,22 @@  discard block
 block discarded – undo
1474 1474
     protected function generateAssociationMappingPropertyDocBlock(array $associationMapping, ClassMetadataInfo $metadata)
1475 1475
     {
1476 1476
         $lines = array();
1477
-        $lines[] = $this->spaces . '/**';
1477
+        $lines[] = $this->spaces.'/**';
1478 1478
 
1479 1479
         if ($associationMapping['type'] & ClassMetadataInfo::TO_MANY) {
1480
-            $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection';
1480
+            $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection';
1481 1481
         } else {
1482
-            $lines[] = $this->spaces . ' * @var \\' . ltrim($associationMapping['targetEntity'], '\\');
1482
+            $lines[] = $this->spaces.' * @var \\'.ltrim($associationMapping['targetEntity'], '\\');
1483 1483
         }
1484 1484
 
1485 1485
         if ($this->generateAnnotations) {
1486
-            $lines[] = $this->spaces . ' *';
1486
+            $lines[] = $this->spaces.' *';
1487 1487
 
1488 1488
             if (isset($associationMapping['id']) && $associationMapping['id']) {
1489
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1489
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1490 1490
 
1491 1491
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1492
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1492
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1493 1493
                 }
1494 1494
             }
1495 1495
 
@@ -1511,15 +1511,15 @@  discard block
 block discarded – undo
1511 1511
             $typeOptions = array();
1512 1512
 
1513 1513
             if (isset($associationMapping['targetEntity'])) {
1514
-                $typeOptions[] = 'targetEntity="' . $associationMapping['targetEntity'] . '"';
1514
+                $typeOptions[] = 'targetEntity="'.$associationMapping['targetEntity'].'"';
1515 1515
             }
1516 1516
 
1517 1517
             if (isset($associationMapping['inversedBy'])) {
1518
-                $typeOptions[] = 'inversedBy="' . $associationMapping['inversedBy'] . '"';
1518
+                $typeOptions[] = 'inversedBy="'.$associationMapping['inversedBy'].'"';
1519 1519
             }
1520 1520
 
1521 1521
             if (isset($associationMapping['mappedBy'])) {
1522
-                $typeOptions[] = 'mappedBy="' . $associationMapping['mappedBy'] . '"';
1522
+                $typeOptions[] = 'mappedBy="'.$associationMapping['mappedBy'].'"';
1523 1523
             }
1524 1524
 
1525 1525
             if ($associationMapping['cascade']) {
@@ -1535,11 +1535,11 @@  discard block
 block discarded – undo
1535 1535
                     $cascades = array('"all"');
1536 1536
                 }
1537 1537
 
1538
-                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
1538
+                $typeOptions[] = 'cascade={'.implode(',', $cascades).'}';
1539 1539
             }
1540 1540
 
1541 1541
             if (isset($associationMapping['orphanRemoval']) && $associationMapping['orphanRemoval']) {
1542
-                $typeOptions[] = 'orphanRemoval=' . ($associationMapping['orphanRemoval'] ? 'true' : 'false');
1542
+                $typeOptions[] = 'orphanRemoval='.($associationMapping['orphanRemoval'] ? 'true' : 'false');
1543 1543
             }
1544 1544
 
1545 1545
             if (isset($associationMapping['fetch']) && $associationMapping['fetch'] !== ClassMetadataInfo::FETCH_LAZY) {
@@ -1548,71 +1548,71 @@  discard block
 block discarded – undo
1548 1548
                     ClassMetadataInfo::FETCH_EAGER      => 'EAGER',
1549 1549
                 );
1550 1550
 
1551
-                $typeOptions[] = 'fetch="' . $fetchMap[$associationMapping['fetch']] . '"';
1551
+                $typeOptions[] = 'fetch="'.$fetchMap[$associationMapping['fetch']].'"';
1552 1552
             }
1553 1553
 
1554
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')';
1554
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')';
1555 1555
 
1556 1556
             if (isset($associationMapping['joinColumns']) && $associationMapping['joinColumns']) {
1557
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({';
1557
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({';
1558 1558
 
1559 1559
                 $joinColumnsLines = array();
1560 1560
 
1561 1561
                 foreach ($associationMapping['joinColumns'] as $joinColumn) {
1562 1562
                     if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) {
1563
-                        $joinColumnsLines[] = $this->spaces . ' *   ' . $joinColumnAnnot;
1563
+                        $joinColumnsLines[] = $this->spaces.' *   '.$joinColumnAnnot;
1564 1564
                     }
1565 1565
                 }
1566 1566
 
1567 1567
                 $lines[] = implode(",\n", $joinColumnsLines);
1568
-                $lines[] = $this->spaces . ' * })';
1568
+                $lines[] = $this->spaces.' * })';
1569 1569
             }
1570 1570
 
1571 1571
             if (isset($associationMapping['joinTable']) && $associationMapping['joinTable']) {
1572 1572
                 $joinTable = array();
1573
-                $joinTable[] = 'name="' . $associationMapping['joinTable']['name'] . '"';
1573
+                $joinTable[] = 'name="'.$associationMapping['joinTable']['name'].'"';
1574 1574
 
1575 1575
                 if (isset($associationMapping['joinTable']['schema'])) {
1576
-                    $joinTable[] = 'schema="' . $associationMapping['joinTable']['schema'] . '"';
1576
+                    $joinTable[] = 'schema="'.$associationMapping['joinTable']['schema'].'"';
1577 1577
                 }
1578 1578
 
1579
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTable) . ',';
1580
-                $lines[] = $this->spaces . ' *   joinColumns={';
1579
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTable).',';
1580
+                $lines[] = $this->spaces.' *   joinColumns={';
1581 1581
 
1582 1582
                 $joinColumnsLines = array();
1583 1583
 
1584 1584
                 foreach ($associationMapping['joinTable']['joinColumns'] as $joinColumn) {
1585
-                    $joinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1585
+                    $joinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1586 1586
                 }
1587 1587
 
1588
-                $lines[] = implode(",". PHP_EOL, $joinColumnsLines);
1589
-                $lines[] = $this->spaces . ' *   },';
1590
-                $lines[] = $this->spaces . ' *   inverseJoinColumns={';
1588
+                $lines[] = implode(",".PHP_EOL, $joinColumnsLines);
1589
+                $lines[] = $this->spaces.' *   },';
1590
+                $lines[] = $this->spaces.' *   inverseJoinColumns={';
1591 1591
 
1592 1592
                 $inverseJoinColumnsLines = array();
1593 1593
 
1594 1594
                 foreach ($associationMapping['joinTable']['inverseJoinColumns'] as $joinColumn) {
1595
-                    $inverseJoinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1595
+                    $inverseJoinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1596 1596
                 }
1597 1597
 
1598
-                $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines);
1599
-                $lines[] = $this->spaces . ' *   }';
1600
-                $lines[] = $this->spaces . ' * )';
1598
+                $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines);
1599
+                $lines[] = $this->spaces.' *   }';
1600
+                $lines[] = $this->spaces.' * )';
1601 1601
             }
1602 1602
 
1603 1603
             if (isset($associationMapping['orderBy'])) {
1604
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({';
1604
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({';
1605 1605
 
1606 1606
                 foreach ($associationMapping['orderBy'] as $name => $direction) {
1607
-                    $lines[] = $this->spaces . ' *     "' . $name . '"="' . $direction . '",';
1607
+                    $lines[] = $this->spaces.' *     "'.$name.'"="'.$direction.'",';
1608 1608
                 }
1609 1609
 
1610 1610
                 $lines[count($lines) - 1] = substr($lines[count($lines) - 1], 0, strlen($lines[count($lines) - 1]) - 1);
1611
-                $lines[] = $this->spaces . ' * })';
1611
+                $lines[] = $this->spaces.' * })';
1612 1612
             }
1613 1613
         }
1614 1614
 
1615
-        $lines[] = $this->spaces . ' */';
1615
+        $lines[] = $this->spaces.' */';
1616 1616
 
1617 1617
         return implode("\n", $lines);
1618 1618
     }
@@ -1626,35 +1626,35 @@  discard block
 block discarded – undo
1626 1626
     protected function generateFieldMappingPropertyDocBlock(array $fieldMapping, ClassMetadataInfo $metadata)
1627 1627
     {
1628 1628
         $lines = array();
1629
-        $lines[] = $this->spaces . '/**';
1630
-        $lines[] = $this->spaces . ' * @var ' . $this->getType($fieldMapping['type']);
1629
+        $lines[] = $this->spaces.'/**';
1630
+        $lines[] = $this->spaces.' * @var '.$this->getType($fieldMapping['type']);
1631 1631
 
1632 1632
         if ($this->generateAnnotations) {
1633
-            $lines[] = $this->spaces . ' *';
1633
+            $lines[] = $this->spaces.' *';
1634 1634
 
1635 1635
             $column = array();
1636 1636
             if (isset($fieldMapping['columnName'])) {
1637
-                $column[] = 'name="' . $fieldMapping['columnName'] . '"';
1637
+                $column[] = 'name="'.$fieldMapping['columnName'].'"';
1638 1638
             }
1639 1639
 
1640 1640
             if (isset($fieldMapping['type'])) {
1641
-                $column[] = 'type="' . $fieldMapping['type'] . '"';
1641
+                $column[] = 'type="'.$fieldMapping['type'].'"';
1642 1642
             }
1643 1643
 
1644 1644
             if (isset($fieldMapping['length'])) {
1645
-                $column[] = 'length=' . $fieldMapping['length'];
1645
+                $column[] = 'length='.$fieldMapping['length'];
1646 1646
             }
1647 1647
 
1648 1648
             if (isset($fieldMapping['precision'])) {
1649
-                $column[] = 'precision=' .  $fieldMapping['precision'];
1649
+                $column[] = 'precision='.$fieldMapping['precision'];
1650 1650
             }
1651 1651
 
1652 1652
             if (isset($fieldMapping['scale'])) {
1653
-                $column[] = 'scale=' . $fieldMapping['scale'];
1653
+                $column[] = 'scale='.$fieldMapping['scale'];
1654 1654
             }
1655 1655
 
1656 1656
             if (isset($fieldMapping['nullable'])) {
1657
-                $column[] = 'nullable=' .  var_export($fieldMapping['nullable'], true);
1657
+                $column[] = 'nullable='.var_export($fieldMapping['nullable'], true);
1658 1658
             }
1659 1659
 
1660 1660
             $options = [];
@@ -1668,47 +1668,47 @@  discard block
 block discarded – undo
1668 1668
             }
1669 1669
 
1670 1670
             if (isset($fieldMapping['columnDefinition'])) {
1671
-                $column[] = 'columnDefinition="' . $fieldMapping['columnDefinition'] . '"';
1671
+                $column[] = 'columnDefinition="'.$fieldMapping['columnDefinition'].'"';
1672 1672
             }
1673 1673
 
1674 1674
             if (isset($fieldMapping['unique'])) {
1675
-                $column[] = 'unique=' . var_export($fieldMapping['unique'], true);
1675
+                $column[] = 'unique='.var_export($fieldMapping['unique'], true);
1676 1676
             }
1677 1677
 
1678
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')';
1678
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')';
1679 1679
 
1680 1680
             if (isset($fieldMapping['id']) && $fieldMapping['id']) {
1681
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1681
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1682 1682
 
1683 1683
                 if ($generatorType = $this->getIdGeneratorTypeString($metadata->generatorType)) {
1684
-                    $lines[] = $this->spaces.' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1684
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1685 1685
                 }
1686 1686
 
1687 1687
                 if ($metadata->sequenceGeneratorDefinition) {
1688 1688
                     $sequenceGenerator = array();
1689 1689
 
1690 1690
                     if (isset($metadata->sequenceGeneratorDefinition['sequenceName'])) {
1691
-                        $sequenceGenerator[] = 'sequenceName="' . $metadata->sequenceGeneratorDefinition['sequenceName'] . '"';
1691
+                        $sequenceGenerator[] = 'sequenceName="'.$metadata->sequenceGeneratorDefinition['sequenceName'].'"';
1692 1692
                     }
1693 1693
 
1694 1694
                     if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) {
1695
-                        $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize'];
1695
+                        $sequenceGenerator[] = 'allocationSize='.$metadata->sequenceGeneratorDefinition['allocationSize'];
1696 1696
                     }
1697 1697
 
1698 1698
                     if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) {
1699
-                        $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue'];
1699
+                        $sequenceGenerator[] = 'initialValue='.$metadata->sequenceGeneratorDefinition['initialValue'];
1700 1700
                     }
1701 1701
 
1702
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $sequenceGenerator) . ')';
1702
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $sequenceGenerator).')';
1703 1703
                 }
1704 1704
             }
1705 1705
 
1706 1706
             if (isset($fieldMapping['version']) && $fieldMapping['version']) {
1707
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version';
1707
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version';
1708 1708
             }
1709 1709
         }
1710 1710
 
1711
-        $lines[] = $this->spaces . ' */';
1711
+        $lines[] = $this->spaces.' */';
1712 1712
 
1713 1713
         return implode("\n", $lines);
1714 1714
     }
@@ -1721,23 +1721,23 @@  discard block
 block discarded – undo
1721 1721
     protected function generateEmbeddedPropertyDocBlock(array $embeddedClass)
1722 1722
     {
1723 1723
         $lines = array();
1724
-        $lines[] = $this->spaces . '/**';
1725
-        $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\');
1724
+        $lines[] = $this->spaces.'/**';
1725
+        $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\');
1726 1726
 
1727 1727
         if ($this->generateAnnotations) {
1728
-            $lines[] = $this->spaces . ' *';
1728
+            $lines[] = $this->spaces.' *';
1729 1729
 
1730
-            $embedded = array('class="' . $embeddedClass['class'] . '"');
1730
+            $embedded = array('class="'.$embeddedClass['class'].'"');
1731 1731
 
1732 1732
             if (isset($fieldMapping['columnPrefix'])) {
1733
-                $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true);
1733
+                $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true);
1734 1734
             }
1735 1735
 
1736
-            $lines[] = $this->spaces . ' * @' .
1737
-                $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')';
1736
+            $lines[] = $this->spaces.' * @'.
1737
+                $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')';
1738 1738
         }
1739 1739
 
1740
-        $lines[] = $this->spaces . ' */';
1740
+        $lines[] = $this->spaces.' */';
1741 1741
 
1742 1742
         return implode("\n", $lines);
1743 1743
     }
@@ -1754,7 +1754,7 @@  discard block
 block discarded – undo
1754 1754
 
1755 1755
         foreach ($lines as $key => $value) {
1756 1756
             if ( ! empty($value)) {
1757
-                $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
1757
+                $lines[$key] = str_repeat($this->spaces, $num).$lines[$key];
1758 1758
             }
1759 1759
         }
1760 1760
 
@@ -1822,9 +1822,9 @@  discard block
 block discarded – undo
1822 1822
 
1823 1823
         foreach ($options as $name => $option) {
1824 1824
             if (is_array($option)) {
1825
-                $optionsStr[] = '"' . $name . '"={' . $this->exportTableOptions($option) . '}';
1825
+                $optionsStr[] = '"'.$name.'"={'.$this->exportTableOptions($option).'}';
1826 1826
             } else {
1827
-                $optionsStr[] = '"' . $name . '"="' . (string) $option . '"';
1827
+                $optionsStr[] = '"'.$name.'"="'.(string) $option.'"';
1828 1828
             }
1829 1829
         }
1830 1830
 
Please login to merge, or discard this patch.
lib/Doctrine/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.