@@ -65,11 +65,11 @@ |
||
65 | 65 | $discriminatorColumn->setType(Type::getType($annotation->type ?? 'string')); |
66 | 66 | $discriminatorColumn->setColumnName($annotation->name); |
67 | 67 | |
68 | - if (! empty($annotation->columnDefinition)) { |
|
68 | + if ( ! empty($annotation->columnDefinition)) { |
|
69 | 69 | $discriminatorColumn->setColumnDefinition($annotation->columnDefinition); |
70 | 70 | } |
71 | 71 | |
72 | - if (! empty($annotation->length)) { |
|
72 | + if ( ! empty($annotation->length)) { |
|
73 | 73 | $discriminatorColumn->setLength($annotation->length); |
74 | 74 | } |
75 | 75 |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | return $this->classNames; |
214 | 214 | } |
215 | 215 | |
216 | - if (! $this->paths) { |
|
216 | + if ( ! $this->paths) { |
|
217 | 217 | throw Mapping\MappingException::pathRequired(); |
218 | 218 | } |
219 | 219 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $includedFiles = []; |
222 | 222 | |
223 | 223 | foreach ($this->paths as $path) { |
224 | - if (! is_dir($path)) { |
|
224 | + if ( ! is_dir($path)) { |
|
225 | 225 | throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
226 | 226 | } |
227 | 227 | |
@@ -230,14 +230,14 @@ discard block |
||
230 | 230 | new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), |
231 | 231 | RecursiveIteratorIterator::LEAVES_ONLY |
232 | 232 | ), |
233 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
233 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
234 | 234 | RecursiveRegexIterator::GET_MATCH |
235 | 235 | ); |
236 | 236 | |
237 | 237 | foreach ($iterator as $file) { |
238 | 238 | $sourceFile = $file[0]; |
239 | 239 | |
240 | - if (! preg_match('(^phar:)i', $sourceFile)) { |
|
240 | + if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
241 | 241 | $sourceFile = realpath($sourceFile); |
242 | 242 | } |
243 | 243 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | if ($parent && $parent->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) { |
416 | 416 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
417 | 417 | do { |
418 | - if (! $parent->isMappedSuperclass) { |
|
418 | + if ( ! $parent->isMappedSuperclass) { |
|
419 | 419 | $metadata->setTable($parent->table); |
420 | 420 | |
421 | 421 | break; |
@@ -605,15 +605,15 @@ discard block |
||
605 | 605 | $fieldMetadata->setVersioned($isVersioned); |
606 | 606 | $fieldMetadata->setColumnName($columnName); |
607 | 607 | |
608 | - if (! $metadata->isMappedSuperclass) { |
|
608 | + if ( ! $metadata->isMappedSuperclass) { |
|
609 | 609 | $fieldMetadata->setTableName($metadata->getTableName()); |
610 | 610 | } |
611 | 611 | |
612 | - if (! empty($columnAnnot->columnDefinition)) { |
|
612 | + if ( ! empty($columnAnnot->columnDefinition)) { |
|
613 | 613 | $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition); |
614 | 614 | } |
615 | 615 | |
616 | - if (! empty($columnAnnot->length)) { |
|
616 | + if ( ! empty($columnAnnot->length)) { |
|
617 | 617 | $fieldMetadata->setLength($columnAnnot->length); |
618 | 618 | } |
619 | 619 | |
@@ -674,13 +674,13 @@ discard block |
||
674 | 674 | 'arguments' => $customGeneratorAnnot->arguments, |
675 | 675 | ]; |
676 | 676 | |
677 | - if (! isset($idGeneratorDefinition['class'])) { |
|
677 | + if ( ! isset($idGeneratorDefinition['class'])) { |
|
678 | 678 | throw new Mapping\MappingException( |
679 | 679 | sprintf('Cannot instantiate custom generator, no class has been defined') |
680 | 680 | ); |
681 | 681 | } |
682 | 682 | |
683 | - if (! class_exists($idGeneratorDefinition['class'])) { |
|
683 | + if ( ! class_exists($idGeneratorDefinition['class'])) { |
|
684 | 684 | throw new Mapping\MappingException( |
685 | 685 | sprintf('Cannot instantiate custom generator : %s', var_export($idGeneratorDefinition, true)) |
686 | 686 | ); |
@@ -722,12 +722,12 @@ discard block |
||
722 | 722 | $assocMetadata->setOrphanRemoval($oneToOneAnnot->orphanRemoval); |
723 | 723 | $assocMetadata->setFetchMode($this->getFetchMode($className, $oneToOneAnnot->fetch)); |
724 | 724 | |
725 | - if (! empty($oneToOneAnnot->mappedBy)) { |
|
725 | + if ( ! empty($oneToOneAnnot->mappedBy)) { |
|
726 | 726 | $assocMetadata->setMappedBy($oneToOneAnnot->mappedBy); |
727 | 727 | $assocMetadata->setOwningSide(false); |
728 | 728 | } |
729 | 729 | |
730 | - if (! empty($oneToOneAnnot->inversedBy)) { |
|
730 | + if ( ! empty($oneToOneAnnot->inversedBy)) { |
|
731 | 731 | $assocMetadata->setInversedBy($oneToOneAnnot->inversedBy); |
732 | 732 | } |
733 | 733 | |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | $assocMetadata->setCascade($this->getCascade($className, $fieldName, $manyToOneAnnot->cascade)); |
794 | 794 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToOneAnnot->fetch)); |
795 | 795 | |
796 | - if (! empty($manyToOneAnnot->inversedBy)) { |
|
796 | + if ( ! empty($manyToOneAnnot->inversedBy)) { |
|
797 | 797 | $assocMetadata->setInversedBy($manyToOneAnnot->inversedBy); |
798 | 798 | } |
799 | 799 | |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | $assocMetadata->setOwningSide(false); |
865 | 865 | $assocMetadata->setMappedBy($oneToManyAnnot->mappedBy); |
866 | 866 | |
867 | - if (! empty($oneToManyAnnot->indexBy)) { |
|
867 | + if ( ! empty($oneToManyAnnot->indexBy)) { |
|
868 | 868 | $assocMetadata->setIndexedBy($oneToManyAnnot->indexBy); |
869 | 869 | } |
870 | 870 | |
@@ -917,16 +917,16 @@ discard block |
||
917 | 917 | $assocMetadata->setOrphanRemoval($manyToManyAnnot->orphanRemoval); |
918 | 918 | $assocMetadata->setFetchMode($this->getFetchMode($className, $manyToManyAnnot->fetch)); |
919 | 919 | |
920 | - if (! empty($manyToManyAnnot->mappedBy)) { |
|
920 | + if ( ! empty($manyToManyAnnot->mappedBy)) { |
|
921 | 921 | $assocMetadata->setMappedBy($manyToManyAnnot->mappedBy); |
922 | 922 | $assocMetadata->setOwningSide(false); |
923 | 923 | } |
924 | 924 | |
925 | - if (! empty($manyToManyAnnot->inversedBy)) { |
|
925 | + if ( ! empty($manyToManyAnnot->inversedBy)) { |
|
926 | 926 | $assocMetadata->setInversedBy($manyToManyAnnot->inversedBy); |
927 | 927 | } |
928 | 928 | |
929 | - if (! empty($manyToManyAnnot->indexBy)) { |
|
929 | + if ( ! empty($manyToManyAnnot->indexBy)) { |
|
930 | 930 | $assocMetadata->setIndexedBy($manyToManyAnnot->indexBy); |
931 | 931 | } |
932 | 932 | |
@@ -978,15 +978,15 @@ discard block |
||
978 | 978 | $fieldMetadata->setType(Type::getType($columnAnnot->type)); |
979 | 979 | $fieldMetadata->setVersioned($isVersioned); |
980 | 980 | |
981 | - if (! empty($columnAnnot->name)) { |
|
981 | + if ( ! empty($columnAnnot->name)) { |
|
982 | 982 | $fieldMetadata->setColumnName($columnAnnot->name); |
983 | 983 | } |
984 | 984 | |
985 | - if (! empty($columnAnnot->columnDefinition)) { |
|
985 | + if ( ! empty($columnAnnot->columnDefinition)) { |
|
986 | 986 | $fieldMetadata->setColumnDefinition($columnAnnot->columnDefinition); |
987 | 987 | } |
988 | 988 | |
989 | - if (! empty($columnAnnot->length)) { |
|
989 | + if ( ! empty($columnAnnot->length)) { |
|
990 | 990 | $fieldMetadata->setLength($columnAnnot->length); |
991 | 991 | } |
992 | 992 | |
@@ -1010,11 +1010,11 @@ discard block |
||
1010 | 1010 | ) : Mapping\JoinTableMetadata { |
1011 | 1011 | $joinTable = new Mapping\JoinTableMetadata(); |
1012 | 1012 | |
1013 | - if (! empty($joinTableAnnot->name)) { |
|
1013 | + if ( ! empty($joinTableAnnot->name)) { |
|
1014 | 1014 | $joinTable->setName($joinTableAnnot->name); |
1015 | 1015 | } |
1016 | 1016 | |
1017 | - if (! empty($joinTableAnnot->schema)) { |
|
1017 | + if ( ! empty($joinTableAnnot->schema)) { |
|
1018 | 1018 | $joinTable->setSchema($joinTableAnnot->schema); |
1019 | 1019 | } |
1020 | 1020 | |
@@ -1042,22 +1042,22 @@ discard block |
||
1042 | 1042 | $joinColumn = new Mapping\JoinColumnMetadata(); |
1043 | 1043 | |
1044 | 1044 | // @todo Remove conditionals for name and referencedColumnName once naming strategy is brought into drivers |
1045 | - if (! empty($joinColumnAnnot->name)) { |
|
1045 | + if ( ! empty($joinColumnAnnot->name)) { |
|
1046 | 1046 | $joinColumn->setColumnName($joinColumnAnnot->name); |
1047 | 1047 | } |
1048 | 1048 | |
1049 | - if (! empty($joinColumnAnnot->referencedColumnName)) { |
|
1049 | + if ( ! empty($joinColumnAnnot->referencedColumnName)) { |
|
1050 | 1050 | $joinColumn->setReferencedColumnName($joinColumnAnnot->referencedColumnName); |
1051 | 1051 | } |
1052 | 1052 | |
1053 | 1053 | $joinColumn->setNullable($joinColumnAnnot->nullable); |
1054 | 1054 | $joinColumn->setUnique($joinColumnAnnot->unique); |
1055 | 1055 | |
1056 | - if (! empty($joinColumnAnnot->fieldName)) { |
|
1056 | + if ( ! empty($joinColumnAnnot->fieldName)) { |
|
1057 | 1057 | $joinColumn->setAliasedName($joinColumnAnnot->fieldName); |
1058 | 1058 | } |
1059 | 1059 | |
1060 | - if (! empty($joinColumnAnnot->columnDefinition)) { |
|
1060 | + if ( ! empty($joinColumnAnnot->columnDefinition)) { |
|
1061 | 1061 | $joinColumn->setColumnDefinition($joinColumnAnnot->columnDefinition); |
1062 | 1062 | } |
1063 | 1063 | |
@@ -1128,7 +1128,7 @@ discard block |
||
1128 | 1128 | ]; |
1129 | 1129 | |
1130 | 1130 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
1131 | - if (! class_exists($listenerClassName)) { |
|
1131 | + if ( ! class_exists($listenerClassName)) { |
|
1132 | 1132 | throw Mapping\MappingException::entityListenerClassNotFound( |
1133 | 1133 | $listenerClassName, |
1134 | 1134 | $metadata->getClassName() |
@@ -1170,7 +1170,7 @@ discard block |
||
1170 | 1170 | $fieldName = $associationOverride->name; |
1171 | 1171 | $property = $metadata->getProperty($fieldName); |
1172 | 1172 | |
1173 | - if (! $property) { |
|
1173 | + if ( ! $property) { |
|
1174 | 1174 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
1175 | 1175 | } |
1176 | 1176 | |
@@ -1204,7 +1204,7 @@ discard block |
||
1204 | 1204 | // Check for fetch |
1205 | 1205 | if ($associationOverride->fetch) { |
1206 | 1206 | $override->setFetchMode( |
1207 | - constant(Mapping\FetchMode::class . '::' . $associationOverride->fetch) |
|
1207 | + constant(Mapping\FetchMode::class.'::'.$associationOverride->fetch) |
|
1208 | 1208 | ); |
1209 | 1209 | } |
1210 | 1210 | |
@@ -1271,7 +1271,7 @@ discard block |
||
1271 | 1271 | { |
1272 | 1272 | $fetchModeConstant = sprintf('%s::%s', Mapping\FetchMode::class, $fetchMode); |
1273 | 1273 | |
1274 | - if (! defined($fetchModeConstant)) { |
|
1274 | + if ( ! defined($fetchModeConstant)) { |
|
1275 | 1275 | throw Mapping\MappingException::invalidFetchMode($className, $fetchMode); |
1276 | 1276 | } |
1277 | 1277 | |
@@ -1286,7 +1286,7 @@ discard block |
||
1286 | 1286 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
1287 | 1287 | |
1288 | 1288 | foreach ($classAnnotations as $key => $annot) { |
1289 | - if (! is_numeric($key)) { |
|
1289 | + if ( ! is_numeric($key)) { |
|
1290 | 1290 | continue; |
1291 | 1291 | } |
1292 | 1292 | |
@@ -1304,7 +1304,7 @@ discard block |
||
1304 | 1304 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
1305 | 1305 | |
1306 | 1306 | foreach ($propertyAnnotations as $key => $annot) { |
1307 | - if (! is_numeric($key)) { |
|
1307 | + if ( ! is_numeric($key)) { |
|
1308 | 1308 | continue; |
1309 | 1309 | } |
1310 | 1310 | |
@@ -1322,7 +1322,7 @@ discard block |
||
1322 | 1322 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
1323 | 1323 | |
1324 | 1324 | foreach ($methodAnnotations as $key => $annot) { |
1325 | - if (! is_numeric($key)) { |
|
1325 | + if ( ! is_numeric($key)) { |
|
1326 | 1326 | continue; |
1327 | 1327 | } |
1328 | 1328 |