Failed Conditions
Pull Request — develop (#6873)
by
unknown
112:44 queued 47:41
created
lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
     protected function configure()
43 43
     {
44 44
         $this->setName('orm:mapping:describe')
45
-             ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
46
-             ->setDescription('Display information about mapped objects')
47
-             ->setHelp(<<<EOT
45
+                ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity')
46
+                ->setDescription('Display information about mapped objects')
47
+                ->setHelp(<<<EOT
48 48
 The %command.full_name% command describes the metadata for the given full or partial entity class name.
49 49
 
50 50
     <info>%command.full_name%</info> My\Namespace\Entity\MyEntity
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     <info>%command.full_name%</info> MyEntity
55 55
 EOT
56
-             );
56
+                );
57 57
     }
58 58
 
59 59
     /**
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
     private function getMappedEntities(EntityManagerInterface $entityManager)
135 135
     {
136 136
         $entityClassNames = $entityManager->getConfiguration()
137
-                                          ->getMetadataDriverImpl()
138
-                                          ->getAllClassNames();
137
+                                            ->getMetadataDriverImpl()
138
+                                            ->getAllClassNames();
139 139
 
140 140
         if ( ! $entityClassNames) {
141 141
             throw new \InvalidArgumentException(
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools\Console\Command;
6 6
 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 
164 164
         $matches = array_filter(
165 165
             $this->getMappedEntities($entityManager),
166
-            function ($mappedEntity) use ($entityName) {
167
-                return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity);
166
+            function($mappedEntity) use ($entityName) {
167
+                return preg_match('{'.preg_quote($entityName).'}', $mappedEntity);
168 168
             }
169 169
         );
170 170
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
             $output[] = $this->formatField(
223 223
                 sprintf('  %s', $parentClass->getParent()),
224
-                ($parentClass->isRootEntity() ? '(Root) ' : '') . $this->formatValue($attributes)
224
+                ($parentClass->isRootEntity() ? '(Root) ' : '').$this->formatValue($attributes)
225 225
             );
226 226
         }
227 227
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         }
247 247
 
248 248
         if (is_bool($value)) {
249
-            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
249
+            return '<comment>'.($value ? 'True' : 'False').'</comment>';
250 250
         }
251 251
 
252 252
         if (empty($value)) {
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 
325 325
             if ($property instanceof FieldMetadata) {
326 326
                 $output = array_merge($output, $this->formatColumn($property));
327
-            }  else if ($property instanceof AssociationMetadata) {
327
+            } else if ($property instanceof AssociationMetadata) {
328 328
                 // @todo guilhermeblanco Fix me! We are trying to iterate through an AssociationMetadata instance
329 329
                 foreach ($property as $field => $value) {
330 330
                     $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH6699Test.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
     public function testMixedParametersWithZeroNumber() : void
21 21
     {
22 22
         $query = $this->_em->createQueryBuilder()
23
-                           ->select('u')
24
-                           ->from(CmsUser::class, 'u')
25
-                           ->andWhere('u.username = :username')
26
-                           ->andWhere('u.id = ?0')
27
-                           ->getQuery();
23
+                            ->select('u')
24
+                            ->from(CmsUser::class, 'u')
25
+                            ->andWhere('u.username = :username')
26
+                            ->andWhere('u.id = ?0')
27
+                            ->getQuery();
28 28
 
29 29
         $query->setParameter('username', 'bar');
30 30
         $query->setParameter(0, 0);
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
     public function testMixedParametersWithZeroNumberOnQueryBuilder() : void
40 40
     {
41 41
         $query = $this->_em->createQueryBuilder()
42
-                           ->select('u')
43
-                           ->from(CmsUser::class, 'u')
44
-                           ->andWhere('u.username = :username')
45
-                           ->andWhere('u.id = ?0')
46
-                           ->setParameter('username', 'bar')
47
-                           ->setParameter(0, 0)
48
-                           ->getQuery();
42
+                            ->select('u')
43
+                            ->from(CmsUser::class, 'u')
44
+                            ->andWhere('u.username = :username')
45
+                            ->andWhere('u.id = ?0')
46
+                            ->setParameter('username', 'bar')
47
+                            ->setParameter(0, 0)
48
+                            ->getQuery();
49 49
 
50 50
         $query->execute();
51 51
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Setup.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools;
6 6
 
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public static function registerAutoloadDirectory($directory)
30 30
     {
31
-        if (!class_exists('Doctrine\Common\ClassLoader', false)) {
32
-            require_once $directory . "/Doctrine/Common/ClassLoader.php";
31
+        if ( ! class_exists('Doctrine\Common\ClassLoader', false)) {
32
+            require_once $directory."/Doctrine/Common/ClassLoader.php";
33 33
         }
34 34
 
35 35
         $loader = new ClassLoader("Doctrine", $directory);
36 36
         $loader->register();
37 37
 
38
-        $loader = new ClassLoader('Symfony\Component', $directory . "/Doctrine");
38
+        $loader = new ClassLoader('Symfony\Component', $directory."/Doctrine");
39 39
         $loader->register();
40 40
     }
41 41
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         return $config;
102 102
     }
103 103
 
104
-    private static function createCacheConfiguration(bool $isDevMode, string $proxyDir, ?Cache $cache) :  Cache
104
+    private static function createCacheConfiguration(bool $isDevMode, string $proxyDir, ?Cache $cache) : Cache
105 105
     {
106 106
         $cache = self::createCacheInstance($isDevMode, $cache);
107 107
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $namespace .= ':';
116 116
         }
117 117
 
118
-        $cache->setNamespace($namespace . 'dc2_' . md5($proxyDir) . '_'); // to avoid collisions
118
+        $cache->setNamespace($namespace.'dc2_'.md5($proxyDir).'_'); // to avoid collisions
119 119
 
120 120
         return $cache;
121 121
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/EntityGenerator.php 1 patch
Spacing   +138 added lines, -138 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools;
6 6
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
      */
330 330
     public function writeEntityClass(ClassMetadata $metadata, $outputDirectory)
331 331
     {
332
-        $path = $outputDirectory . '/' . str_replace('\\', DIRECTORY_SEPARATOR, $metadata->getClassName()) . $this->extension;
332
+        $path = $outputDirectory.'/'.str_replace('\\', DIRECTORY_SEPARATOR, $metadata->getClassName()).$this->extension;
333 333
         $dir = dirname($path);
334 334
 
335 335
         if ( ! is_dir($dir)) {
@@ -345,8 +345,8 @@  discard block
 block discarded – undo
345 345
         }
346 346
 
347 347
         if ($this->backupExisting && file_exists($path)) {
348
-            $backupPath = dirname($path) . DIRECTORY_SEPARATOR . basename($path) . "~";
349
-            if (!copy($path, $backupPath)) {
348
+            $backupPath = dirname($path).DIRECTORY_SEPARATOR.basename($path)."~";
349
+            if ( ! copy($path, $backupPath)) {
350 350
                 throw new \RuntimeException("Attempt to backup overwritten entity file but copy operation failed.");
351 351
             }
352 352
         }
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         $body = str_replace('<spaces>', $this->spaces, $body);
409 409
         $last = strrpos($currentCode, '}');
410 410
 
411
-        return substr($currentCode, 0, $last) . $body . ($body ? "\n" : '') . "}\n";
411
+        return substr($currentCode, 0, $last).$body.($body ? "\n" : '')."}\n";
412 412
     }
413 413
 
414 414
     /**
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     public function setFieldVisibility($visibility)
473 473
     {
474 474
         if ($visibility !== static::FIELD_VISIBLE_PRIVATE && $visibility !== static::FIELD_VISIBLE_PROTECTED) {
475
-            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): ' . $visibility);
475
+            throw new \InvalidArgumentException('Invalid provided visibility (only private and protected are allowed): '.$visibility);
476 476
         }
477 477
 
478 478
         $this->fieldVisibility = $visibility;
@@ -569,11 +569,11 @@  discard block
 block discarded – undo
569 569
      */
570 570
     protected function generateEntityNamespace(ClassMetadata $metadata)
571 571
     {
572
-        if (! $this->hasNamespace($metadata)) {
572
+        if ( ! $this->hasNamespace($metadata)) {
573 573
             return '';
574 574
         }
575 575
 
576
-        return 'namespace ' . $this->getNamespace($metadata) .';';
576
+        return 'namespace '.$this->getNamespace($metadata).';';
577 577
     }
578 578
 
579 579
     /**
@@ -595,8 +595,8 @@  discard block
 block discarded – undo
595 595
      */
596 596
     protected function generateEntityClassName(ClassMetadata $metadata)
597 597
     {
598
-        return 'class ' . $this->getClassName($metadata) .
599
-            ($this->extendsClass() ? ' extends ' . $this->getClassToExtendName() : null);
598
+        return 'class '.$this->getClassName($metadata).
599
+            ($this->extendsClass() ? ' extends '.$this->getClassToExtendName() : null);
600 600
     }
601 601
 
602 602
     /**
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
         $optionalFields = [];
682 682
 
683 683
         foreach ($metadata->getDeclaredPropertiesIterator() as $property) {
684
-            if (! $property->isNullable()) {
684
+            if ( ! $property->isNullable()) {
685 685
                 $requiredFields[] = $property;
686 686
 
687 687
                 continue;
@@ -710,13 +710,13 @@  discard block
 block discarded – undo
710 710
             $fieldName  = $property->getName();
711 711
             $fieldType  = $property->getTypeName();
712 712
             $mappedType = $this->getType($fieldType);
713
-            $param      = '$' . $fieldName;
713
+            $param      = '$'.$fieldName;
714 714
 
715
-            $paramTypes[] = $mappedType . ($property->isNullable() ? '|null' : '');
715
+            $paramTypes[] = $mappedType.($property->isNullable() ? '|null' : '');
716 716
             $paramVariables[] = $param;
717 717
 
718 718
             if ($fieldType === 'datetime') {
719
-                $param = $mappedType . ' ' . $param;
719
+                $param = $mappedType.' '.$param;
720 720
             }
721 721
 
722 722
             if ($property->isNullable()) {
@@ -725,13 +725,13 @@  discard block
 block discarded – undo
725 725
 
726 726
             $params[] = $param;
727 727
 
728
-            $fields[] = '$this->' . $fieldName . ' = $' . $fieldName . ';';
728
+            $fields[] = '$this->'.$fieldName.' = $'.$fieldName.';';
729 729
         }
730 730
 
731 731
         $maxParamTypeLength = max(array_map('strlen', $paramTypes));
732 732
         $paramTags = array_map(
733
-            function ($type, $variable) use ($maxParamTypeLength) {
734
-                return '@param ' . $type . str_repeat(' ', $maxParamTypeLength - strlen($type) + 1) . $variable;
733
+            function($type, $variable) use ($maxParamTypeLength) {
734
+                return '@param '.$type.str_repeat(' ', $maxParamTypeLength - strlen($type) + 1).$variable;
735 735
             },
736 736
             $paramTypes,
737 737
             $paramVariables
@@ -739,8 +739,8 @@  discard block
 block discarded – undo
739 739
 
740 740
         // Generate multi line constructor if the signature exceeds 120 characters.
741 741
         if (array_sum(array_map('strlen', $params)) + count($params) * 2 + 29 > 120) {
742
-            $delimiter = "\n" . $this->spaces;
743
-            $params = $delimiter . implode(',' . $delimiter, $params) . "\n";
742
+            $delimiter = "\n".$this->spaces;
743
+            $params = $delimiter.implode(','.$delimiter, $params)."\n";
744 744
         } else {
745 745
             $params = implode(', ', $params);
746 746
         }
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
         $replacements = [
749 749
             '<paramTags>' => implode("\n * ", $paramTags),
750 750
             '<params>'    => $params,
751
-            '<fields>'    => implode("\n" . $this->spaces, $fields),
751
+            '<fields>'    => implode("\n".$this->spaces, $fields),
752 752
         ];
753 753
 
754 754
         $constructor = str_replace(
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
 
794 794
             if ($inClass) {
795 795
                 $inClass = false;
796
-                $lastSeenClass = $lastSeenNamespace . ($lastSeenNamespace ? '\\' : '') . $token[1];
796
+                $lastSeenClass = $lastSeenNamespace.($lastSeenNamespace ? '\\' : '').$token[1];
797 797
                 $this->staticReflection[$lastSeenClass]['properties'] = [];
798 798
                 $this->staticReflection[$lastSeenClass]['methods'] = [];
799 799
             }
@@ -801,16 +801,16 @@  discard block
 block discarded – undo
801 801
             if (T_NAMESPACE === $token[0]) {
802 802
                 $lastSeenNamespace = '';
803 803
                 $inNamespace = true;
804
-            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i-1][0]) {
804
+            } elseif (T_CLASS === $token[0] && T_DOUBLE_COLON !== $tokens[$i - 1][0]) {
805 805
                 $inClass = true;
806 806
             } elseif (T_FUNCTION === $token[0]) {
807
-                if (T_STRING === $tokens[$i+2][0]) {
808
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+2][1]);
809
-                } elseif ($tokens[$i+2] == '&' && T_STRING === $tokens[$i+3][0]) {
810
-                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i+3][1]);
807
+                if (T_STRING === $tokens[$i + 2][0]) {
808
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 2][1]);
809
+                } elseif ($tokens[$i + 2] == '&' && T_STRING === $tokens[$i + 3][0]) {
810
+                    $this->staticReflection[$lastSeenClass]['methods'][] = strtolower($tokens[$i + 3][1]);
811 811
                 }
812
-            } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i+2][0]) {
813
-                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i+2][1], 1);
812
+            } elseif (in_array($token[0], [T_VAR, T_PUBLIC, T_PRIVATE, T_PROTECTED], true) && T_FUNCTION !== $tokens[$i + 2][0]) {
813
+                $this->staticReflection[$lastSeenClass]['properties'][] = substr($tokens[$i + 2][1], 1);
814 814
             }
815 815
         }
816 816
     }
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
      */
824 824
     protected function hasProperty($property, ClassMetadata $metadata)
825 825
     {
826
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->getClassName()))) {
826
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->getClassName()))) {
827 827
             // don't generate property if its already on the base class.
828 828
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->getClassName());
829 829
 
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
      */
854 854
     protected function hasMethod($method, ClassMetadata $metadata)
855 855
     {
856
-        if ($this->extendsClass() || (!$this->isNew && class_exists($metadata->getClassName()))) {
856
+        if ($this->extendsClass() || ( ! $this->isNew && class_exists($metadata->getClassName()))) {
857 857
             // don't generate method if its already on the base class.
858 858
             $reflClass = new \ReflectionClass($this->getClassToExtend() ?: $metadata->getClassName());
859 859
 
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
      */
885 885
     protected function getTraits(ClassMetadata $metadata)
886 886
     {
887
-        if (! ($metadata->getReflectionClass() !== null || class_exists($metadata->getClassName()))) {
887
+        if ( ! ($metadata->getReflectionClass() !== null || class_exists($metadata->getClassName()))) {
888 888
             return [];
889 889
         }
890 890
 
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
     {
934 934
         $refl = new \ReflectionClass($this->getClassToExtend());
935 935
 
936
-        return '\\' . $refl->getName();
936
+        return '\\'.$refl->getName();
937 937
     }
938 938
 
939 939
     /**
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
     {
967 967
         $lines = [];
968 968
         $lines[] = '/**';
969
-        $lines[] = ' * ' . $this->getClassName($metadata);
969
+        $lines[] = ' * '.$this->getClassName($metadata);
970 970
 
971 971
         if ($this->generateAnnotations) {
972 972
             $lines[] = ' *';
@@ -982,12 +982,12 @@  discard block
 block discarded – undo
982 982
 
983 983
             foreach ($methods as $method) {
984 984
                 if ($code = $this->$method($metadata)) {
985
-                    $lines[] = ' * ' . $code;
985
+                    $lines[] = ' * '.$code;
986 986
                 }
987 987
             }
988 988
 
989 989
             if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
990
-                $lines[] = ' * @' . $this->annotationsPrefix . 'HasLifecycleCallbacks';
990
+                $lines[] = ' * @'.$this->annotationsPrefix.'HasLifecycleCallbacks';
991 991
             }
992 992
         }
993 993
 
@@ -1003,17 +1003,17 @@  discard block
 block discarded – undo
1003 1003
      */
1004 1004
     protected function generateEntityAnnotation(ClassMetadata $metadata)
1005 1005
     {
1006
-        $prefix = '@' . $this->annotationsPrefix;
1006
+        $prefix = '@'.$this->annotationsPrefix;
1007 1007
 
1008 1008
         if ($metadata->isEmbeddedClass) {
1009
-            return $prefix . 'Embeddable';
1009
+            return $prefix.'Embeddable';
1010 1010
         }
1011 1011
 
1012 1012
         $customRepository = $metadata->getCustomRepositoryClassName()
1013
-            ? '(repositoryClass="' . $metadata->getCustomRepositoryClassName() . '")'
1013
+            ? '(repositoryClass="'.$metadata->getCustomRepositoryClassName().'")'
1014 1014
             : '';
1015 1015
 
1016
-        return $prefix . ($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity') . $customRepository;
1016
+        return $prefix.($metadata->isMappedSuperclass ? 'MappedSuperclass' : 'Entity').$customRepository;
1017 1017
     }
1018 1018
 
1019 1019
     /**
@@ -1030,28 +1030,28 @@  discard block
 block discarded – undo
1030 1030
         $table = [];
1031 1031
 
1032 1032
         if ($metadata->table->getSchema()) {
1033
-            $table[] = 'schema="' . $metadata->table->getSchema() . '"';
1033
+            $table[] = 'schema="'.$metadata->table->getSchema().'"';
1034 1034
         }
1035 1035
 
1036 1036
         if ($metadata->table->getName()) {
1037
-            $table[] = 'name="' . $metadata->table->getName() . '"';
1037
+            $table[] = 'name="'.$metadata->table->getName().'"';
1038 1038
         }
1039 1039
 
1040 1040
         if ($metadata->table->getOptions()) {
1041
-            $table[] = 'options={' . $this->exportTableOptions($metadata->table->getOptions()) . '}';
1041
+            $table[] = 'options={'.$this->exportTableOptions($metadata->table->getOptions()).'}';
1042 1042
         }
1043 1043
 
1044 1044
         if ($metadata->table->getUniqueConstraints()) {
1045 1045
             $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table->getUniqueConstraints());
1046
-            $table[] = 'uniqueConstraints={' . $constraints . '}';
1046
+            $table[] = 'uniqueConstraints={'.$constraints.'}';
1047 1047
         }
1048 1048
 
1049 1049
         if ($metadata->table->getIndexes()) {
1050 1050
             $constraints = $this->generateTableConstraints('Index', $metadata->table->getIndexes());
1051
-            $table[] = 'indexes={' . $constraints . '}';
1051
+            $table[] = 'indexes={'.$constraints.'}';
1052 1052
         }
1053 1053
 
1054
-        return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
1054
+        return '@'.$this->annotationsPrefix.'Table('.implode(', ', $table).')';
1055 1055
     }
1056 1056
 
1057 1057
     /**
@@ -1068,10 +1068,10 @@  discard block
 block discarded – undo
1068 1068
             $columns = [];
1069 1069
 
1070 1070
             foreach ($constraint['columns'] as $column) {
1071
-                $columns[] = '"' . $column . '"';
1071
+                $columns[] = '"'.$column.'"';
1072 1072
             }
1073 1073
 
1074
-            $annotations[] = '@' . $this->annotationsPrefix . $constraintName . '(name="' . $name . '", columns={' . implode(', ', $columns) . '})';
1074
+            $annotations[] = '@'.$this->annotationsPrefix.$constraintName.'(name="'.$name.'", columns={'.implode(', ', $columns).'})';
1075 1075
         }
1076 1076
 
1077 1077
         return implode(', ', $annotations);
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
     protected function generateInheritanceAnnotation(ClassMetadata $metadata)
1086 1086
     {
1087 1087
         if ($metadata->inheritanceType !== InheritanceType::NONE) {
1088
-            return '@' . $this->annotationsPrefix . 'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1088
+            return '@'.$this->annotationsPrefix.'InheritanceType("'.$this->getInheritanceTypeString($metadata->inheritanceType).'")';
1089 1089
         }
1090 1090
     }
1091 1091
 
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
                 $discrColumn->getLength()
1107 1107
             );
1108 1108
 
1109
-            return '@' . $this->annotationsPrefix . 'DiscriminatorColumn(' . $columnDefinition . ')';
1109
+            return '@'.$this->annotationsPrefix.'DiscriminatorColumn('.$columnDefinition.')';
1110 1110
         }
1111 1111
     }
1112 1112
 
@@ -1121,10 +1121,10 @@  discard block
 block discarded – undo
1121 1121
             $inheritanceClassMap = [];
1122 1122
 
1123 1123
             foreach ($metadata->discriminatorMap as $type => $class) {
1124
-                $inheritanceClassMap[] .= '"' . $type . '" = "' . $class . '"';
1124
+                $inheritanceClassMap[] .= '"'.$type.'" = "'.$class.'"';
1125 1125
             }
1126 1126
 
1127
-            return '@' . $this->annotationsPrefix . 'DiscriminatorMap({' . implode(', ', $inheritanceClassMap) . '})';
1127
+            return '@'.$this->annotationsPrefix.'DiscriminatorMap({'.implode(', ', $inheritanceClassMap).'})';
1128 1128
         }
1129 1129
     }
1130 1130
 
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
 
1156 1156
         foreach ($metadata->getDeclaredPropertiesIterator() as $fieldName => $property) {
1157 1157
             if ($property instanceof FieldMetadata) {
1158
-                $nullable  = $property->isNullable() ? 'null' : null;
1158
+                $nullable = $property->isNullable() ? 'null' : null;
1159 1159
 
1160 1160
                 if ($code = $this->generateEntityStubMethod($metadata, 'get', $fieldName, $property->getTypeName(), $nullable)) {
1161 1161
                     $methods[] = $code;
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
         ;
1212 1212
 
1213 1213
         foreach ($joinColumns as $joinColumn) {
1214
-            if (! $joinColumn->isNullable()) {
1214
+            if ( ! $joinColumn->isNullable()) {
1215 1215
                 return false;
1216 1216
             }
1217 1217
         }
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
 
1261 1261
             if ($property instanceof FieldMetadata) {
1262 1262
                 $options      = $property->getOptions();
1263
-                $defaultValue = isset($options['default']) ? ' = ' . var_export($options['default'], true) : null;
1263
+                $defaultValue = isset($options['default']) ? ' = '.var_export($options['default'], true) : null;
1264 1264
 
1265 1265
                 $lines[] = $this->generateFieldMappingPropertyDocBlock($property, $metadata);
1266 1266
             } else {
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
                 $lines[] = $this->generateAssociationMappingPropertyDocBlock($property, $metadata);
1270 1270
             }
1271 1271
 
1272
-            $lines[] = $this->spaces . $this->fieldVisibility . ' $' . $fieldName . $defaultValue . ";\n";
1272
+            $lines[] = $this->spaces.$this->fieldVisibility.' $'.$fieldName.$defaultValue.";\n";
1273 1273
         }
1274 1274
 
1275 1275
         return implode("\n", $lines);
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
      */
1308 1308
     protected function generateEntityStubMethod(ClassMetadata $metadata, $type, $fieldName, $typeHint = null, $defaultValue = null)
1309 1309
     {
1310
-        $methodName = $type . Inflector::classify($fieldName);
1310
+        $methodName = $type.Inflector::classify($fieldName);
1311 1311
         $variableName = Inflector::camelize($fieldName);
1312 1312
 
1313 1313
         if (in_array($type, ["add", "remove"])) {
@@ -1328,18 +1328,18 @@  discard block
 block discarded – undo
1328 1328
         $variableType   = $typeHint ? $this->getType($typeHint) : null;
1329 1329
 
1330 1330
         if ($typeHint && ! isset($types[$typeHint])) {
1331
-            $variableType   =  '\\' . ltrim($variableType, '\\');
1332
-            $methodTypeHint =  '\\' . $typeHint . ' ';
1331
+            $variableType   = '\\'.ltrim($variableType, '\\');
1332
+            $methodTypeHint = '\\'.$typeHint.' ';
1333 1333
         }
1334 1334
 
1335 1335
         $replacements = [
1336
-          '<description>'       => ucfirst($type) . ' ' . $variableName . '.',
1336
+          '<description>'       => ucfirst($type).' '.$variableName.'.',
1337 1337
           '<methodTypeHint>'    => $methodTypeHint,
1338
-          '<variableType>'      => $variableType . (null !== $defaultValue ? ('|' . $defaultValue) : ''),
1338
+          '<variableType>'      => $variableType.(null !== $defaultValue ? ('|'.$defaultValue) : ''),
1339 1339
           '<variableName>'      => $variableName,
1340 1340
           '<methodName>'        => $methodName,
1341 1341
           '<fieldName>'         => $fieldName,
1342
-          '<variableDefault>'   => ($defaultValue !== null ) ? (' = ' . $defaultValue) : '',
1342
+          '<variableDefault>'   => ($defaultValue !== null) ? (' = '.$defaultValue) : '',
1343 1343
           '<entity>'            => $this->getClassName($metadata)
1344 1344
         ];
1345 1345
 
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
         $this->staticReflection[$metadata->getClassName()]['methods'][] = $methodName;
1369 1369
 
1370 1370
         $replacements = [
1371
-            '<name>'        => $this->annotationsPrefix . ucfirst($name),
1371
+            '<name>'        => $this->annotationsPrefix.ucfirst($name),
1372 1372
             '<methodName>'  => $methodName,
1373 1373
         ];
1374 1374
 
@@ -1388,25 +1388,25 @@  discard block
 block discarded – undo
1388 1388
      */
1389 1389
     protected function generateIdentifierAnnotation(Property $metadata)
1390 1390
     {
1391
-        $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Id';
1391
+        $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Id';
1392 1392
 
1393 1393
         if ($metadata instanceof FieldMetadata) {
1394 1394
             if ($generatorType = $this->getIdGeneratorTypeString($metadata->getValueGenerator()->getType())) {
1395
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
1395
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'GeneratedValue(strategy="'.$generatorType.'")';
1396 1396
             }
1397 1397
 
1398 1398
             if ($metadata->getValueGenerator()->getType()) {
1399 1399
                 $generator = [];
1400 1400
 
1401 1401
                 if (isset($metadata->getValueGenerator()->getDefinition()['sequenceName'])) {
1402
-                    $generator[] = 'sequenceName="' . $metadata->getValueGenerator()->getDefinition()['sequenceName'] . '"';
1402
+                    $generator[] = 'sequenceName="'.$metadata->getValueGenerator()->getDefinition()['sequenceName'].'"';
1403 1403
                 }
1404 1404
 
1405 1405
                 if (isset($metadata->getValueGenerator()->getDefinition()['allocationSize'])) {
1406
-                    $generator[] = 'allocationSize=' . $metadata->getValueGenerator()->getDefinition()['allocationSize'];
1406
+                    $generator[] = 'allocationSize='.$metadata->getValueGenerator()->getDefinition()['allocationSize'];
1407 1407
                 }
1408 1408
 
1409
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'SequenceGenerator(' . implode(', ', $generator) . ')';
1409
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'SequenceGenerator('.implode(', ', $generator).')';
1410 1410
             }
1411 1411
         }
1412 1412
 
@@ -1422,34 +1422,34 @@  discard block
 block discarded – undo
1422 1422
     {
1423 1423
         $lines            = [];
1424 1424
         $joinTableAnnot   = [];
1425
-        $joinTableAnnot[] = 'name="' . $joinTable->getName() . '"';
1425
+        $joinTableAnnot[] = 'name="'.$joinTable->getName().'"';
1426 1426
 
1427
-        if (! empty($joinTable->getSchema())) {
1428
-            $joinTableAnnot[] = 'schema="' . $joinTable->getSchema() . '"';
1427
+        if ( ! empty($joinTable->getSchema())) {
1428
+            $joinTableAnnot[] = 'schema="'.$joinTable->getSchema().'"';
1429 1429
         }
1430 1430
 
1431
-        $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinTable(' . implode(', ', $joinTableAnnot) . ',';
1432
-        $lines[] = $this->spaces . ' *   joinColumns={';
1431
+        $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinTable('.implode(', ', $joinTableAnnot).',';
1432
+        $lines[] = $this->spaces.' *   joinColumns={';
1433 1433
 
1434 1434
         $joinColumnsLines = [];
1435 1435
 
1436 1436
         foreach ($joinTable->getJoinColumns() as $joinColumn) {
1437
-            $joinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1437
+            $joinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1438 1438
         }
1439 1439
 
1440
-        $lines[] = implode(",". PHP_EOL, $joinColumnsLines);
1441
-        $lines[] = $this->spaces . ' *   },';
1442
-        $lines[] = $this->spaces . ' *   inverseJoinColumns={';
1440
+        $lines[] = implode(",".PHP_EOL, $joinColumnsLines);
1441
+        $lines[] = $this->spaces.' *   },';
1442
+        $lines[] = $this->spaces.' *   inverseJoinColumns={';
1443 1443
 
1444 1444
         $inverseJoinColumnsLines = [];
1445 1445
 
1446 1446
         foreach ($joinTable->getInverseJoinColumns() as $joinColumn) {
1447
-            $inverseJoinColumnsLines[] = $this->spaces . ' *     ' . $this->generateJoinColumnAnnotation($joinColumn);
1447
+            $inverseJoinColumnsLines[] = $this->spaces.' *     '.$this->generateJoinColumnAnnotation($joinColumn);
1448 1448
         }
1449 1449
 
1450
-        $lines[] = implode(",". PHP_EOL, $inverseJoinColumnsLines);
1451
-        $lines[] = $this->spaces . ' *   }';
1452
-        $lines[] = $this->spaces . ' * )';
1450
+        $lines[] = implode(",".PHP_EOL, $inverseJoinColumnsLines);
1451
+        $lines[] = $this->spaces.' *   }';
1452
+        $lines[] = $this->spaces.' * )';
1453 1453
 
1454 1454
         return implode(PHP_EOL, $lines);
1455 1455
     }
@@ -1463,23 +1463,23 @@  discard block
 block discarded – undo
1463 1463
     {
1464 1464
         $joinColumnAnnot = [];
1465 1465
 
1466
-        $joinColumnAnnot[] = 'name="' . $joinColumn->getColumnName() . '"';
1467
-        $joinColumnAnnot[] = 'referencedColumnName="' . $joinColumn->getReferencedColumnName() . '"';
1466
+        $joinColumnAnnot[] = 'name="'.$joinColumn->getColumnName().'"';
1467
+        $joinColumnAnnot[] = 'referencedColumnName="'.$joinColumn->getReferencedColumnName().'"';
1468 1468
 
1469 1469
         if ($joinColumn->isUnique()) {
1470 1470
             $joinColumnAnnot[] = 'unique=true';
1471 1471
         }
1472 1472
 
1473
-        if (!$joinColumn->isNullable()) {
1473
+        if ( ! $joinColumn->isNullable()) {
1474 1474
             $joinColumnAnnot[] = 'nullable=false';
1475 1475
         }
1476 1476
 
1477
-        if (!empty($joinColumn->getOnDelete())) {
1478
-            $joinColumnAnnot[] = 'onDelete="' . $joinColumn->getOnDelete() . '"';
1477
+        if ( ! empty($joinColumn->getOnDelete())) {
1478
+            $joinColumnAnnot[] = 'onDelete="'.$joinColumn->getOnDelete().'"';
1479 1479
         }
1480 1480
 
1481 1481
         if ($joinColumn->getColumnDefinition()) {
1482
-            $joinColumnAnnot[] = 'columnDefinition="' . $joinColumn->getColumnDefinition() . '"';
1482
+            $joinColumnAnnot[] = 'columnDefinition="'.$joinColumn->getColumnDefinition().'"';
1483 1483
         }
1484 1484
 
1485 1485
         $options = [];
@@ -1494,7 +1494,7 @@  discard block
 block discarded – undo
1494 1494
             $joinColumnAnnot[] = 'options={'.implode(',', $options).'}';
1495 1495
         }
1496 1496
 
1497
-        return '@' . $this->annotationsPrefix . 'JoinColumn(' . implode(', ', $joinColumnAnnot) . ')';
1497
+        return '@'.$this->annotationsPrefix.'JoinColumn('.implode(', ', $joinColumnAnnot).')';
1498 1498
     }
1499 1499
 
1500 1500
     /**
@@ -1506,16 +1506,16 @@  discard block
 block discarded – undo
1506 1506
     protected function generateAssociationMappingPropertyDocBlock(AssociationMetadata $association, ClassMetadata $metadata)
1507 1507
     {
1508 1508
         $lines = [];
1509
-        $lines[] = $this->spaces . '/**';
1509
+        $lines[] = $this->spaces.'/**';
1510 1510
 
1511 1511
         if ($association instanceof ToManyAssociationMetadata) {
1512
-            $lines[] = $this->spaces . ' * @var \Doctrine\Common\Collections\Collection';
1512
+            $lines[] = $this->spaces.' * @var \Doctrine\Common\Collections\Collection';
1513 1513
         } else {
1514
-            $lines[] = $this->spaces . ' * @var \\' . ltrim($association->getTargetEntity(), '\\');
1514
+            $lines[] = $this->spaces.' * @var \\'.ltrim($association->getTargetEntity(), '\\');
1515 1515
         }
1516 1516
 
1517 1517
         if ($this->generateAnnotations) {
1518
-            $lines[] = $this->spaces . ' *';
1518
+            $lines[] = $this->spaces.' *';
1519 1519
 
1520 1520
             if ($association->isPrimaryKey()) {
1521 1521
                 $lines[] = $this->generateIdentifierAnnotation($association);
@@ -1535,18 +1535,18 @@  discard block
 block discarded – undo
1535 1535
 
1536 1536
             $typeOptions = [];
1537 1537
 
1538
-            $typeOptions[] = 'targetEntity="' . $association->getTargetEntity() . '"';
1538
+            $typeOptions[] = 'targetEntity="'.$association->getTargetEntity().'"';
1539 1539
 
1540 1540
             if ($association->getMappedBy()) {
1541
-                $typeOptions[] = 'mappedBy="' . $association->getMappedBy() . '"';
1541
+                $typeOptions[] = 'mappedBy="'.$association->getMappedBy().'"';
1542 1542
             }
1543 1543
 
1544 1544
             if ($association->getInversedBy()) {
1545
-                $typeOptions[] = 'inversedBy="' . $association->getInversedBy() . '"';
1545
+                $typeOptions[] = 'inversedBy="'.$association->getInversedBy().'"';
1546 1546
             }
1547 1547
 
1548 1548
             if ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy()) {
1549
-                $typeOptions[] = 'indexBy="' . $association->getIndexedBy() . '"';
1549
+                $typeOptions[] = 'indexBy="'.$association->getIndexedBy().'"';
1550 1550
             }
1551 1551
 
1552 1552
             if ($association->isOrphanRemoval()) {
@@ -1566,28 +1566,28 @@  discard block
 block discarded – undo
1566 1566
                     $cascades = ['"all"'];
1567 1567
                 }
1568 1568
 
1569
-                $typeOptions[] = 'cascade={' . implode(',', $cascades) . '}';
1569
+                $typeOptions[] = 'cascade={'.implode(',', $cascades).'}';
1570 1570
             }
1571 1571
 
1572 1572
             if ($association->getFetchMode() !== FetchMode::LAZY) {
1573
-                $typeOptions[] = 'fetch="' . $association->getFetchMode() . '"';
1573
+                $typeOptions[] = 'fetch="'.$association->getFetchMode().'"';
1574 1574
             }
1575 1575
 
1576
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . '' . $type . '(' . implode(', ', $typeOptions) . ')';
1576
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.''.$type.'('.implode(', ', $typeOptions).')';
1577 1577
 
1578 1578
             if ($association instanceof ToOneAssociationMetadata && $association->getJoinColumns()) {
1579
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'JoinColumns({';
1579
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'JoinColumns({';
1580 1580
 
1581 1581
                 $joinColumnsLines = [];
1582 1582
 
1583 1583
                 foreach ($association->getJoinColumns() as $joinColumn) {
1584 1584
                     if ($joinColumnAnnot = $this->generateJoinColumnAnnotation($joinColumn)) {
1585
-                        $joinColumnsLines[] = $this->spaces . ' *   ' . $joinColumnAnnot;
1585
+                        $joinColumnsLines[] = $this->spaces.' *   '.$joinColumnAnnot;
1586 1586
                     }
1587 1587
                 }
1588 1588
 
1589 1589
                 $lines[] = implode(",\n", $joinColumnsLines);
1590
-                $lines[] = $this->spaces . ' * })';
1590
+                $lines[] = $this->spaces.' * })';
1591 1591
             }
1592 1592
 
1593 1593
             if ($association instanceof ToManyAssociationMetadata) {
@@ -1596,20 +1596,20 @@  discard block
 block discarded – undo
1596 1596
                 }
1597 1597
 
1598 1598
                 if ($association->getOrderBy()) {
1599
-                    $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'OrderBy({';
1599
+                    $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'OrderBy({';
1600 1600
                     $orderBy = [];
1601 1601
 
1602 1602
                     foreach ($association->getOrderBy() as $name => $direction) {
1603
-                        $orderBy[] = $this->spaces . ' *     "' . $name . '"="' . $direction . '"';
1603
+                        $orderBy[] = $this->spaces.' *     "'.$name.'"="'.$direction.'"';
1604 1604
                     }
1605 1605
 
1606
-                    $lines[] = implode(',' . PHP_EOL, $orderBy);
1607
-                    $lines[] = $this->spaces . ' * })';
1606
+                    $lines[] = implode(','.PHP_EOL, $orderBy);
1607
+                    $lines[] = $this->spaces.' * })';
1608 1608
                 }
1609 1609
             }
1610 1610
         }
1611 1611
 
1612
-        $lines[] = $this->spaces . ' */';
1612
+        $lines[] = $this->spaces.' */';
1613 1613
 
1614 1614
         return implode("\n", $lines);
1615 1615
     }
@@ -1626,49 +1626,49 @@  discard block
 block discarded – undo
1626 1626
 
1627 1627
         $lines = [];
1628 1628
 
1629
-        $lines[] = $this->spaces . '/**';
1630
-        $lines[] = $this->spaces . ' * @var '
1629
+        $lines[] = $this->spaces.'/**';
1630
+        $lines[] = $this->spaces.' * @var '
1631 1631
             . $this->getType($fieldType)
1632 1632
             . ($propertyMetadata->isNullable() ? '|null' : '');
1633 1633
 
1634 1634
         if ($this->generateAnnotations) {
1635 1635
             $column  = [];
1636
-            $lines[] = $this->spaces . ' *';
1636
+            $lines[] = $this->spaces.' *';
1637 1637
 
1638 1638
             if ($propertyMetadata->getColumnName()) {
1639
-                $column[] = 'name="' . $propertyMetadata->getColumnName() . '"';
1639
+                $column[] = 'name="'.$propertyMetadata->getColumnName().'"';
1640 1640
             }
1641 1641
 
1642
-            $column[] = 'type="' . $fieldType . '"';
1642
+            $column[] = 'type="'.$fieldType.'"';
1643 1643
 
1644 1644
             if (is_int($propertyMetadata->getLength())) {
1645
-                $column[] = 'length=' . $propertyMetadata->getLength();
1645
+                $column[] = 'length='.$propertyMetadata->getLength();
1646 1646
             }
1647 1647
 
1648 1648
             if (is_int($propertyMetadata->getPrecision())) {
1649
-                $column[] = 'precision=' .  $propertyMetadata->getPrecision();
1649
+                $column[] = 'precision='.$propertyMetadata->getPrecision();
1650 1650
             }
1651 1651
 
1652 1652
             if (is_int($propertyMetadata->getScale())) {
1653
-                $column[] = 'scale=' .  $propertyMetadata->getScale();
1653
+                $column[] = 'scale='.$propertyMetadata->getScale();
1654 1654
             }
1655 1655
 
1656 1656
             if ($propertyMetadata->isNullable()) {
1657
-                $column[] = 'nullable=' .  var_export($propertyMetadata->isNullable(), true);
1657
+                $column[] = 'nullable='.var_export($propertyMetadata->isNullable(), true);
1658 1658
             }
1659 1659
 
1660 1660
             if ($propertyMetadata->isUnique()) {
1661
-                $column[] = 'unique=' . var_export($propertyMetadata->isUnique(), true);
1661
+                $column[] = 'unique='.var_export($propertyMetadata->isUnique(), true);
1662 1662
             }
1663 1663
 
1664 1664
             if ($propertyMetadata->getColumnDefinition()) {
1665
-                $column[] = 'columnDefinition="' . $propertyMetadata->getColumnDefinition() . '"';
1665
+                $column[] = 'columnDefinition="'.$propertyMetadata->getColumnDefinition().'"';
1666 1666
             }
1667 1667
 
1668 1668
             $options = [];
1669 1669
 
1670 1670
             if (isset($fieldMapping['options']['default']) && $fieldMapping['options']['default']) {
1671
-                $options[] = '"default"="' . $fieldMapping['options']['default'] .'"';
1671
+                $options[] = '"default"="'.$fieldMapping['options']['default'].'"';
1672 1672
             }
1673 1673
 
1674 1674
             if (isset($fieldMapping['options']['unsigned']) && $fieldMapping['options']['unsigned']) {
@@ -1680,33 +1680,33 @@  discard block
 block discarded – undo
1680 1680
             }
1681 1681
 
1682 1682
             if (isset($fieldMapping['options']['comment']) && $fieldMapping['options']['comment']) {
1683
-                $options[] = '"comment"="' . $fieldMapping['options']['comment'] .'"';
1683
+                $options[] = '"comment"="'.$fieldMapping['options']['comment'].'"';
1684 1684
             }
1685 1685
 
1686 1686
             if (isset($fieldMapping['options']['collation']) && $fieldMapping['options']['collation']) {
1687
-                $options[] = '"collation"="' . $fieldMapping['options']['collation'] .'"';
1687
+                $options[] = '"collation"="'.$fieldMapping['options']['collation'].'"';
1688 1688
             }
1689 1689
 
1690 1690
             if (isset($fieldMapping['options']['check']) && $fieldMapping['options']['check']) {
1691
-                $options[] = '"check"="' . $fieldMapping['options']['check'] .'"';
1691
+                $options[] = '"check"="'.$fieldMapping['options']['check'].'"';
1692 1692
             }
1693 1693
 
1694 1694
             if ($options) {
1695 1695
                 $column[] = 'options={'.implode(',', $options).'}';
1696 1696
             }
1697 1697
 
1698
-            $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Column(' . implode(', ', $column) . ')';
1698
+            $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Column('.implode(', ', $column).')';
1699 1699
 
1700 1700
             if ($propertyMetadata->isPrimaryKey()) {
1701 1701
                 $lines[] = $this->generateIdentifierAnnotation($propertyMetadata);
1702 1702
             }
1703 1703
 
1704 1704
             if ($metadata->isVersioned() && $metadata->versionProperty->getName() === $propertyMetadata->getName()) {
1705
-                $lines[] = $this->spaces . ' * @' . $this->annotationsPrefix . 'Version';
1705
+                $lines[] = $this->spaces.' * @'.$this->annotationsPrefix.'Version';
1706 1706
             }
1707 1707
         }
1708 1708
 
1709
-        $lines[] = $this->spaces . ' */';
1709
+        $lines[] = $this->spaces.' */';
1710 1710
 
1711 1711
         return implode("\n", $lines);
1712 1712
     }
@@ -1719,27 +1719,27 @@  discard block
 block discarded – undo
1719 1719
     protected function generateEmbeddedPropertyDocBlock(array $embeddedClass)
1720 1720
     {
1721 1721
         $lines = [];
1722
-        $lines[] = $this->spaces . '/**';
1723
-        $lines[] = $this->spaces . ' * @var \\' . ltrim($embeddedClass['class'], '\\');
1722
+        $lines[] = $this->spaces.'/**';
1723
+        $lines[] = $this->spaces.' * @var \\'.ltrim($embeddedClass['class'], '\\');
1724 1724
 
1725 1725
         if ($this->generateAnnotations) {
1726
-            $lines[] = $this->spaces . ' *';
1726
+            $lines[] = $this->spaces.' *';
1727 1727
 
1728
-            $embedded = ['class="' . $embeddedClass['class'] . '"'];
1728
+            $embedded = ['class="'.$embeddedClass['class'].'"'];
1729 1729
 
1730 1730
             if (isset($embeddedClass['columnPrefix'])) {
1731 1731
                 if (is_string($embeddedClass['columnPrefix'])) {
1732
-                    $embedded[] = 'columnPrefix="' . $embeddedClass['columnPrefix'] . '"';
1732
+                    $embedded[] = 'columnPrefix="'.$embeddedClass['columnPrefix'].'"';
1733 1733
                 } else {
1734
-                    $embedded[] = 'columnPrefix=' . var_export($embeddedClass['columnPrefix'], true);
1734
+                    $embedded[] = 'columnPrefix='.var_export($embeddedClass['columnPrefix'], true);
1735 1735
                 }
1736 1736
             }
1737 1737
 
1738
-            $lines[] = $this->spaces . ' * @' .
1739
-                $this->annotationsPrefix . 'Embedded(' . implode(', ', $embedded) . ')';
1738
+            $lines[] = $this->spaces.' * @'.
1739
+                $this->annotationsPrefix.'Embedded('.implode(', ', $embedded).')';
1740 1740
         }
1741 1741
 
1742
-        $lines[] = $this->spaces . ' */';
1742
+        $lines[] = $this->spaces.' */';
1743 1743
 
1744 1744
         return implode("\n", $lines);
1745 1745
     }
@@ -1753,13 +1753,13 @@  discard block
 block discarded – undo
1753 1753
         $processedClasses = [];
1754 1754
         foreach ($metadata->entityListeners as $event => $eventListeners) {
1755 1755
             foreach ($eventListeners as $eventListener) {
1756
-                $processedClasses[] = '"' . $eventListener['class'] . '"';
1756
+                $processedClasses[] = '"'.$eventListener['class'].'"';
1757 1757
             }
1758 1758
         }
1759 1759
 
1760 1760
         return \sprintf(
1761 1761
             '%s%s({%s})',
1762
-            '@' . $this->annotationsPrefix,
1762
+            '@'.$this->annotationsPrefix,
1763 1763
             'EntityListeners',
1764 1764
             \implode(',', \array_unique($processedClasses))
1765 1765
         );
@@ -1777,7 +1777,7 @@  discard block
 block discarded – undo
1777 1777
 
1778 1778
         foreach ($lines as $key => $value) {
1779 1779
             if ( ! empty($value)) {
1780
-                $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key];
1780
+                $lines[$key] = str_repeat($this->spaces, $num).$lines[$key];
1781 1781
             }
1782 1782
         }
1783 1783
 
@@ -1845,8 +1845,8 @@  discard block
 block discarded – undo
1845 1845
 
1846 1846
         foreach ($options as $name => $option) {
1847 1847
             $optionValue = is_array($option)
1848
-                ? '{' . $this->exportTableOptions($option) . '}'
1849
-                : '"' . (string) $option . '"'
1848
+                ? '{'.$this->exportTableOptions($option).'}'
1849
+                : '"'.(string) $option.'"'
1850 1850
             ;
1851 1851
 
1852 1852
             $optionsStr[] = sprintf('"%s"=%s', $name, $optionValue);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,18 +31,18 @@  discard block
 block discarded – undo
31 31
     protected function configure()
32 32
     {
33 33
         $this->setName('orm:generate-entities')
34
-             ->setAliases(['orm:generate:entities'])
35
-             ->setDescription('Generate entity classes and method stubs from your mapping information')
36
-             ->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your entity classes.')
37
-             ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
38
-             ->addOption('generate-annotations', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate annotation metadata on entities.', false)
39
-             ->addOption('generate-methods', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate stub methods on entities.', true)
40
-             ->addOption('regenerate-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should regenerate entity if it exists.', false)
41
-             ->addOption('update-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should only update entity if it exists.', true)
42
-             ->addOption('extend', null, InputOption::VALUE_REQUIRED, 'Defines a base class to be extended by generated entity classes.')
43
-             ->addOption('num-spaces', null, InputOption::VALUE_REQUIRED, 'Defines the number of indentation spaces', 4)
44
-             ->addOption('no-backup', null, InputOption::VALUE_NONE, 'Flag to define if generator should avoid backuping existing entity file if it exists.')
45
-             ->setHelp(<<<EOT
34
+                ->setAliases(['orm:generate:entities'])
35
+                ->setDescription('Generate entity classes and method stubs from your mapping information')
36
+                ->addArgument('dest-path', InputArgument::REQUIRED, 'The path to generate your entity classes.')
37
+                ->addOption('filter', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'A string pattern used to match entities that should be processed.')
38
+                ->addOption('generate-annotations', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate annotation metadata on entities.', false)
39
+                ->addOption('generate-methods', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should generate stub methods on entities.', true)
40
+                ->addOption('regenerate-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should regenerate entity if it exists.', false)
41
+                ->addOption('update-entities', null, InputOption::VALUE_OPTIONAL, 'Flag to define if generator should only update entity if it exists.', true)
42
+                ->addOption('extend', null, InputOption::VALUE_REQUIRED, 'Defines a base class to be extended by generated entity classes.')
43
+                ->addOption('num-spaces', null, InputOption::VALUE_REQUIRED, 'Defines the number of indentation spaces', 4)
44
+                ->addOption('no-backup', null, InputOption::VALUE_NONE, 'Flag to define if generator should avoid backuping existing entity file if it exists.')
45
+                ->setHelp(<<<EOT
46 46
 Generate entity classes and method stubs from your mapping information.
47 47
 
48 48
 If you use the <comment>--update-entities</comment> or <comment>--regenerate-entities</comment> flags your existing
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 for you correctly, because it doesn't know which class is supposed to extend
62 62
 which. You have to adjust the entity code manually for inheritance to work!
63 63
 EOT
64
-             );
64
+                );
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     protected function configure()
25 25
     {
26 26
         $this->setName('orm:info')
27
-             ->setDescription('Show basic information about all mapped entities')
28
-             ->setHelp(<<<EOT
27
+                ->setDescription('Show basic information about all mapped entities')
28
+                ->setHelp(<<<EOT
29 29
 The <info>%command.name%</info> shows basic information about which
30 30
 entities exist and possibly if their mapping information contains errors or
31 31
 not.
32 32
 EOT
33
-             );
33
+                );
34 34
     }
35 35
 
36 36
     /**
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
         $entityManager = $this->getHelper('em')->getEntityManager();
43 43
 
44 44
         $entityClassNames = $entityManager->getConfiguration()
45
-                                          ->getMetadataDriverImpl()
46
-                                          ->getAllClassNames();
45
+                                            ->getMetadataDriverImpl()
46
+                                            ->getAllClassNames();
47 47
 
48 48
         if ( ! $entityClassNames) {
49 49
             throw new \Exception(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Tools\Console\Command;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 1 patch
Spacing   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Entity;
6 6
 
@@ -300,14 +300,14 @@  discard block
 block discarded – undo
300 300
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
301 301
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
302 302
         $identifier     = array_map(
303
-            function ($columnName) { return $this->platform->quoteIdentifier($columnName); },
303
+            function($columnName) { return $this->platform->quoteIdentifier($columnName); },
304 304
             array_keys($versionedClass->getIdentifierColumns($this->em))
305 305
         );
306 306
 
307 307
         // FIXME: Order with composite keys might not be correct
308
-        $sql = 'SELECT ' . $columnName
309
-             . ' FROM '  . $tableName
310
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
308
+        $sql = 'SELECT '.$columnName
309
+             . ' FROM '.$tableName
310
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
311 311
 
312 312
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
313 313
         $versionType = $versionProperty->getType();
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 
394 394
             if (($value = $identifier[$field]) !== null) {
395 395
                 // @todo guilhermeblanco Make sure we do not have flat association values.
396
-                if (! is_array($value)) {
396
+                if ( ! is_array($value)) {
397 397
                     $value = [$targetClass->identifier[0] => $value];
398 398
                 }
399 399
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
407 407
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
408 408
 
409
-                if (! $joinColumn->getType()) {
409
+                if ( ! $joinColumn->getType()) {
410 410
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
411 411
                 }
412 412
 
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
                         $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
475 475
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
476 476
 
477
-                        if (! $joinColumn->getType()) {
477
+                        if ( ! $joinColumn->getType()) {
478 478
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
479 479
                         }
480 480
 
@@ -501,18 +501,18 @@  discard block
 block discarded – undo
501 501
                 case Type::SMALLINT:
502 502
                 case Type::INTEGER:
503 503
                 case Type::BIGINT:
504
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
504
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
505 505
                     break;
506 506
 
507 507
                 case Type::DATETIME:
508
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
508
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
509 509
                     break;
510 510
             }
511 511
         }
512 512
 
513
-        $sql = 'UPDATE ' . $quotedTableName
514
-             . ' SET ' . implode(', ', $set)
515
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
513
+        $sql = 'UPDATE '.$quotedTableName
514
+             . ' SET '.implode(', ', $set)
515
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
516 516
 
517 517
         $result = $this->conn->executeUpdate($sql, $params, $types);
518 518
 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
     protected function deleteJoinTableRecords($identifier)
532 532
     {
533 533
         foreach ($this->class->getDeclaredPropertiesIterator() as $association) {
534
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
534
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
535 535
                 continue;
536 536
             }
537 537
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
             $keys              = [];
545 545
 
546 546
             if ( ! $owningAssociation->isOwningSide()) {
547
-                $class       = $this->em->getClassMetadata($association->getTargetEntity());
547
+                $class = $this->em->getClassMetadata($association->getTargetEntity());
548 548
                 $owningAssociation = $class->getProperty($association->getMappedBy());
549 549
             }
550 550
 
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
             }
657 657
 
658 658
             // Only owning side of x-1 associations can have a FK column.
659
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
659
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
660 660
                 continue;
661 661
             }
662 662
 
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
                 /** @var JoinColumnMetadata $joinColumn */
677 677
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
678 678
 
679
-                if (! $joinColumn->getType()) {
679
+                if ( ! $joinColumn->getType()) {
680 680
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
681 681
                 }
682 682
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         $propertyName = $this->class->fieldNames[$columnName];
706 706
         $property     = $this->class->getProperty($propertyName);
707 707
 
708
-        if (! $property) {
708
+        if ( ! $property) {
709 709
             return null;
710 710
         }
711 711
 
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
             /** @var JoinColumnMetadata $joinColumn */
725 725
             $referencedColumnName = $joinColumn->getReferencedColumnName();
726 726
 
727
-            if (! $joinColumn->getType()) {
727
+            if ( ! $joinColumn->getType()) {
728 728
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
729 729
             }
730 730
 
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
         $criteria       = [];
1062 1062
         $parameters     = [];
1063 1063
 
1064
-        if (! $association->isOwningSide()) {
1064
+        if ( ! $association->isOwningSide()) {
1065 1065
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1066 1066
             $owningAssoc = $class->getProperty($association->getMappedBy());
1067 1067
         }
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
                 $value = $value[$targetClass->identifier[0]];
1090 1090
             }
1091 1091
 
1092
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1092
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1093 1093
             $parameters[] = [
1094 1094
                 'value' => $value,
1095 1095
                 'field' => $fieldName,
@@ -1140,11 +1140,11 @@  discard block
 block discarded – undo
1140 1140
 
1141 1141
         switch ($lockMode) {
1142 1142
             case LockMode::PESSIMISTIC_READ:
1143
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1143
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1144 1144
                 break;
1145 1145
 
1146 1146
             case LockMode::PESSIMISTIC_WRITE:
1147
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1147
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1148 1148
                 break;
1149 1149
         }
1150 1150
 
@@ -1155,14 +1155,14 @@  discard block
 block discarded – undo
1155 1155
 
1156 1156
         if ('' !== $filterSql) {
1157 1157
             $conditionSql = $conditionSql
1158
-                ? $conditionSql . ' AND ' . $filterSql
1158
+                ? $conditionSql.' AND '.$filterSql
1159 1159
                 : $filterSql;
1160 1160
         }
1161 1161
 
1162
-        $select = 'SELECT ' . $columnList;
1163
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1164
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1165
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1162
+        $select = 'SELECT '.$columnList;
1163
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1164
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1165
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1166 1166
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1167 1167
         $query  = $select
1168 1168
             . $lock
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
             . $where
1171 1171
             . $orderBySql;
1172 1172
 
1173
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1173
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1174 1174
     }
1175 1175
 
1176 1176
     /**
@@ -1189,13 +1189,13 @@  discard block
 block discarded – undo
1189 1189
 
1190 1190
         if ('' !== $filterSql) {
1191 1191
             $conditionSql = $conditionSql
1192
-                ? $conditionSql . ' AND ' . $filterSql
1192
+                ? $conditionSql.' AND '.$filterSql
1193 1193
                 : $filterSql;
1194 1194
         }
1195 1195
 
1196 1196
         $sql = 'SELECT COUNT(*) '
1197
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1198
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1197
+            . 'FROM '.$tableName.' '.$tableAlias
1198
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1199 1199
 
1200 1200
         return $sql;
1201 1201
     }
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
      */
1213 1213
     protected final function getOrderBySQL(array $orderBy, $baseTableAlias)
1214 1214
     {
1215
-        if (! $orderBy) {
1215
+        if ( ! $orderBy) {
1216 1216
             return '';
1217 1217
         }
1218 1218
 
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
         foreach ($orderBy as $fieldName => $orientation) {
1222 1222
             $orientation = strtoupper(trim($orientation));
1223 1223
 
1224
-            if (! in_array($orientation, ['ASC', 'DESC'])) {
1224
+            if ( ! in_array($orientation, ['ASC', 'DESC'])) {
1225 1225
                 throw ORMException::invalidOrientation($this->class->getClassName(), $fieldName);
1226 1226
             }
1227 1227
 
@@ -1231,11 +1231,11 @@  discard block
 block discarded – undo
1231 1231
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1232 1232
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1233 1233
 
1234
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1234
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1235 1235
 
1236 1236
                 continue;
1237 1237
             } else if ($property instanceof AssociationMetadata) {
1238
-                if (! $property->isOwningSide()) {
1238
+                if ( ! $property->isOwningSide()) {
1239 1239
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $fieldName);
1240 1240
                 }
1241 1241
 
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
                     /* @var JoinColumnMetadata $joinColumn */
1249 1249
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1250 1250
 
1251
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1251
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1252 1252
                 }
1253 1253
 
1254 1254
                 continue;
@@ -1257,7 +1257,7 @@  discard block
 block discarded – undo
1257 1257
             throw ORMException::unrecognizedField($fieldName);
1258 1258
         }
1259 1259
 
1260
-        return ' ORDER BY ' . implode(', ', $orderByList);
1260
+        return ' ORDER BY '.implode(', ', $orderByList);
1261 1261
     }
1262 1262
 
1263 1263
     /**
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
 
1280 1280
 
1281 1281
         $this->currentPersisterContext->rsm->addEntityResult($this->class->getClassName(), 'r'); // r for root
1282
-        $this->currentPersisterContext->selectJoinSql    = '';
1282
+        $this->currentPersisterContext->selectJoinSql = '';
1283 1283
 
1284 1284
         $eagerAliasCounter = 0;
1285 1285
         $columnList        = [];
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
                         break; // now this is why you shouldn't use inheritance
1316 1316
                     }
1317 1317
 
1318
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1318
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1319 1319
 
1320 1320
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1321 1321
 
@@ -1340,14 +1340,14 @@  discard block
 block discarded – undo
1340 1340
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1341 1341
                     }
1342 1342
 
1343
-                    if (! $property->isOwningSide()) {
1343
+                    if ( ! $property->isOwningSide()) {
1344 1344
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1345 1345
                     }
1346 1346
 
1347 1347
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1348 1348
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1349 1349
 
1350
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1350
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1351 1351
 
1352 1352
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1353 1353
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
                         $joinCondition[] = $filterSql;
1370 1370
                     }
1371 1371
 
1372
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1372
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1373 1373
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1374 1374
 
1375 1375
                     break;
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
      */
1394 1394
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1395 1395
     {
1396
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1396
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1397 1397
             return '';
1398 1398
         }
1399 1399
 
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
             $referencedColumnName = $joinColumn->getReferencedColumnName();
1409 1409
             $resultColumnName     = $this->getSQLColumnAlias();
1410 1410
 
1411
-            if (! $joinColumn->getType()) {
1411
+            if ( ! $joinColumn->getType()) {
1412 1412
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1413 1413
             }
1414 1414
 
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
         $owningAssociation = $association;
1441 1441
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1442 1442
 
1443
-        if (! $association->isOwningSide()) {
1443
+        if ( ! $association->isOwningSide()) {
1444 1444
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1445 1445
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1446 1446
         }
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
             );
1463 1463
         }
1464 1464
 
1465
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1465
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1466 1466
     }
1467 1467
 
1468 1468
     /**
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
                             $columnName           = $joinColumn->getColumnName();
1558 1558
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1559 1559
 
1560
-                            if (! $joinColumn->getType()) {
1560
+                            if ( ! $joinColumn->getType()) {
1561 1561
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1562 1562
                             }
1563 1563
 
@@ -1596,7 +1596,7 @@  discard block
 block discarded – undo
1596 1596
 
1597 1597
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1598 1598
 
1599
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1599
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1600 1600
     }
1601 1601
 
1602 1602
     /**
@@ -1610,14 +1610,14 @@  discard block
 block discarded – undo
1610 1610
     protected function getSQLTableAlias($tableName, $assocName = '')
1611 1611
     {
1612 1612
         if ($tableName) {
1613
-            $tableName .= '#' . $assocName;
1613
+            $tableName .= '#'.$assocName;
1614 1614
         }
1615 1615
 
1616 1616
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1617 1617
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1618 1618
         }
1619 1619
 
1620
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1620
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1621 1621
 
1622 1622
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1623 1623
 
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
         }
1645 1645
 
1646 1646
         $lock  = $this->getLockTablesSql($lockMode);
1647
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1647
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1648 1648
         $sql = 'SELECT 1 '
1649 1649
              . $lock
1650 1650
              . $where
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1668 1668
 
1669 1669
         return $this->platform->appendLockHint(
1670
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1670
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1671 1671
             $lockMode
1672 1672
         );
1673 1673
     }
@@ -1720,19 +1720,19 @@  discard block
 block discarded – undo
1720 1720
 
1721 1721
             if (null !== $comparison) {
1722 1722
                 // special case null value handling
1723
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1724
-                    $selectedColumns[] = $column . ' IS NULL';
1723
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1724
+                    $selectedColumns[] = $column.' IS NULL';
1725 1725
 
1726 1726
                     continue;
1727 1727
                 }
1728 1728
 
1729 1729
                 if ($comparison === Comparison::NEQ && null === $value) {
1730
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1730
+                    $selectedColumns[] = $column.' IS NOT NULL';
1731 1731
 
1732 1732
                     continue;
1733 1733
                 }
1734 1734
 
1735
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1735
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1736 1736
 
1737 1737
                 continue;
1738 1738
             }
@@ -1778,7 +1778,7 @@  discard block
 block discarded – undo
1778 1778
         if (isset($this->class->fieldMappings[$field])) {
1779 1779
             $className = $this->class->fieldMappings[$field]['inherited'] ?? $this->class->name;
1780 1780
 
1781
-            return [$tableAlias . '.' . $columnName];
1781
+            return [$tableAlias.'.'.$columnName];
1782 1782
         }
1783 1783
 
1784 1784
         if ($property instanceof AssociationMetadata) {
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
 
1788 1788
             // Many-To-Many requires join table check for joinColumn
1789 1789
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1790
-                if (! $owningAssociation->isOwningSide()) {
1790
+                if ( ! $owningAssociation->isOwningSide()) {
1791 1791
                     $owningAssociation = $association;
1792 1792
                 }
1793 1793
 
@@ -1801,17 +1801,17 @@  discard block
 block discarded – undo
1801 1801
                 foreach ($joinColumns as $joinColumn) {
1802 1802
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1803 1803
 
1804
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1804
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1805 1805
                 }
1806 1806
 
1807 1807
             } else {
1808
-                if (! $owningAssociation->isOwningSide()) {
1808
+                if ( ! $owningAssociation->isOwningSide()) {
1809 1809
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $field);
1810 1810
                 }
1811 1811
 
1812 1812
                 $className = $association['inherited'] ?? $this->class->name;
1813 1813
 
1814
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1814
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1815 1815
                 }
1816 1816
             }
1817 1817
 
@@ -1924,7 +1924,7 @@  discard block
 block discarded – undo
1924 1924
                 $value = $value[$targetClass->identifier[0]];
1925 1925
             }
1926 1926
 
1927
-            $criteria[$tableAlias . "." . $quotedColumnName] = $value;
1927
+            $criteria[$tableAlias.".".$quotedColumnName] = $value;
1928 1928
             $parameters[] = [
1929 1929
                 'value' => $value,
1930 1930
                 'field' => $fieldName,
@@ -2011,7 +2011,7 @@  discard block
 block discarded – undo
2011 2011
             case ($property instanceof AssociationMetadata):
2012 2012
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2013 2013
 
2014
-                if (! $property->isOwningSide()) {
2014
+                if ( ! $property->isOwningSide()) {
2015 2015
                     $property = $class->getProperty($property->getMappedBy());
2016 2016
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2017 2017
                 }
@@ -2025,7 +2025,7 @@  discard block
 block discarded – undo
2025 2025
                     /** @var JoinColumnMetadata $joinColumn */
2026 2026
                     $referencedColumnName = $joinColumn->getReferencedColumnName();
2027 2027
 
2028
-                    if (! $joinColumn->getType()) {
2028
+                    if ( ! $joinColumn->getType()) {
2029 2029
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
2030 2030
                     }
2031 2031
 
@@ -2040,7 +2040,7 @@  discard block
 block discarded – undo
2040 2040
         }
2041 2041
 
2042 2042
         if (is_array($value)) {
2043
-            return array_map(function ($type) {
2043
+            return array_map(function($type) {
2044 2044
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2045 2045
             }, $types);
2046 2046
         }
@@ -2119,12 +2119,12 @@  discard block
 block discarded – undo
2119 2119
 
2120 2120
         $sql = 'SELECT 1 '
2121 2121
              . $this->getLockTablesSql(null)
2122
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2122
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2123 2123
 
2124 2124
         list($params, $types) = $this->expandParameters($criteria);
2125 2125
 
2126 2126
         if (null !== $extraConditions) {
2127
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2127
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2128 2128
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2129 2129
 
2130 2130
             $params = array_merge($params, $criteriaParams);
@@ -2132,7 +2132,7 @@  discard block
 block discarded – undo
2132 2132
         }
2133 2133
 
2134 2134
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2135
-            $sql .= ' AND ' . $filterSql;
2135
+            $sql .= ' AND '.$filterSql;
2136 2136
         }
2137 2137
 
2138 2138
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2147,13 +2147,13 @@  discard block
 block discarded – undo
2147 2147
      */
2148 2148
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2149 2149
     {
2150
-        if (! $association->isOwningSide()) {
2150
+        if ( ! $association->isOwningSide()) {
2151 2151
             return 'LEFT JOIN';
2152 2152
         }
2153 2153
 
2154 2154
         // if one of the join columns is nullable, return left join
2155 2155
         foreach ($association->getJoinColumns() as $joinColumn) {
2156
-             if (! $joinColumn->isNullable()) {
2156
+             if ( ! $joinColumn->isNullable()) {
2157 2157
                  continue;
2158 2158
              }
2159 2159
 
@@ -2170,7 +2170,7 @@  discard block
 block discarded – undo
2170 2170
      */
2171 2171
     public function getSQLColumnAlias()
2172 2172
     {
2173
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2173
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2174 2174
     }
2175 2175
 
2176 2176
     /**
@@ -2187,13 +2187,13 @@  discard block
 block discarded – undo
2187 2187
 
2188 2188
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2189 2189
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2190
-                $filterClauses[] = '(' . $filterExpr . ')';
2190
+                $filterClauses[] = '('.$filterExpr.')';
2191 2191
             }
2192 2192
         }
2193 2193
 
2194 2194
         $sql = implode(' AND ', $filterClauses);
2195 2195
 
2196
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2196
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2197 2197
     }
2198 2198
 
2199 2199
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/AbstractQuery.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM;
6 6
 
7 7
 use Doctrine\Common\Collections\Collection;
8
-use Doctrine\Common\Collections\ArrayCollection;;
8
+use Doctrine\Common\Collections\ArrayCollection; ;
9 9
 use Doctrine\ORM\Query\Parameter;
10 10
 use Doctrine\ORM\Cache\QueryCacheKey;
11 11
 use Doctrine\DBAL\Cache\QueryCacheProfile;
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
     public function getParameter($key)
306 306
     {
307 307
         $filteredParameters = $this->parameters->filter(
308
-            function (Query\Parameter $parameter) use ($key) : bool {
308
+            function(Query\Parameter $parameter) use ($key) : bool {
309 309
                 $parameterName = $parameter->getName();
310 310
 
311 311
                 return $key === $parameterName || (string) $key === (string) $parameterName;
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
      */
444 444
     private function translateNamespaces(Query\ResultSetMapping $rsm)
445 445
     {
446
-        $translate = function ($alias) {
446
+        $translate = function($alias) {
447 447
             return $this->em->getClassMetadata($alias)->getClassName();
448 448
         };
449 449
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
      */
506 506
     public function setResultCacheProfile(QueryCacheProfile $profile = null)
507 507
     {
508
-        if (! $profile->getResultCacheDriver()) {
508
+        if ( ! $profile->getResultCacheDriver()) {
509 509
             $resultCacheDriver = $this->em->getConfiguration()->getResultCacheImpl();
510 510
             $profile = $profile->setResultCacheDriver($resultCacheDriver);
511 511
         }
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
             $this->getTimestampKey()
974 974
         );
975 975
 
976
-        $result     = $queryCache->get($queryKey, $rsm, $this->hints);
976
+        $result = $queryCache->get($queryKey, $rsm, $this->hints);
977 977
 
978 978
         if ($result !== null) {
979 979
             if ($this->cacheLogger) {
@@ -1107,6 +1107,6 @@  discard block
 block discarded – undo
1107 1107
 
1108 1108
         ksort($hints);
1109 1109
 
1110
-        return sha1($query . '-' . serialize($params) . '-' . serialize($hints));
1110
+        return sha1($query.'-'.serialize($params).'-'.serialize($hints));
1111 1111
     }
1112 1112
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\ORM\Internal\Hydration;
6 6
 
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
                 // It's a joined result
98 98
 
99 99
                 $parent = $this->rsm->parentAliasMap[$dqlAlias];
100
-                $path   = $parent . '.' . $dqlAlias;
100
+                $path   = $parent.'.'.$dqlAlias;
101 101
 
102 102
                 // missing parent data, skipping as RIGHT JOIN hydration is not supported.
103
-                if ( ! isset($nonemptyComponents[$parent]) ) {
103
+                if ( ! isset($nonemptyComponents[$parent])) {
104 104
                     continue;
105 105
                 }
106 106
 
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
                 if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) {
110 110
                     $first = reset($this->resultPointers);
111 111
                     // TODO: Exception if $key === null ?
112
-                    $baseElement =& $this->resultPointers[$parent][key($first)];
112
+                    $baseElement = & $this->resultPointers[$parent][key($first)];
113 113
                 } else if (isset($this->resultPointers[$parent])) {
114
-                    $baseElement =& $this->resultPointers[$parent];
114
+                    $baseElement = & $this->resultPointers[$parent];
115 115
                 } else {
116 116
                     unset($this->resultPointers[$dqlAlias]); // Ticket #1228
117 117
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 $relation      = $parentClass->getProperty($relationAlias);
124 124
 
125 125
                 // Check the type of the relation (many or single-valued)
126
-                if (! $relation instanceof ToOneAssociationMetadata) {
126
+                if ( ! $relation instanceof ToOneAssociationMetadata) {
127 127
                     $oneToOne = false;
128 128
 
129 129
                     if ( ! isset($baseElement[$relationAlias])) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                     }
163 163
                 }
164 164
 
165
-                $coll =& $baseElement[$relationAlias];
165
+                $coll = & $baseElement[$relationAlias];
166 166
 
167 167
                 if (is_array($coll)) {
168 168
                     $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                 $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0;
175 175
 
176 176
                 // if this row has a NULL value for the root result id then make it a null result.
177
-                if ( ! isset($nonemptyComponents[$dqlAlias]) ) {
177
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
178 178
                     $result[] = $this->rsm->isMixed
179 179
                         ? [$entityKey => null]
180 180
                         : null;
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
         }
274 274
 
275 275
         if ($oneToOne) {
276
-            $this->resultPointers[$dqlAlias] =& $coll;
276
+            $this->resultPointers[$dqlAlias] = & $coll;
277 277
 
278 278
             return;
279 279
         }
280 280
 
281 281
         if ($index !== false) {
282
-            $this->resultPointers[$dqlAlias] =& $coll[$index];
282
+            $this->resultPointers[$dqlAlias] = & $coll[$index];
283 283
 
284 284
             return;
285 285
         }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         }
290 290
 
291 291
         end($coll);
292
-        $this->resultPointers[$dqlAlias] =& $coll[key($coll)];
292
+        $this->resultPointers[$dqlAlias] = & $coll[key($coll)];
293 293
 
294 294
         return;
295 295
     }
Please login to merge, or discard this patch.