@@ -1431,7 +1431,7 @@ |
||
1431 | 1431 | |
1432 | 1432 | if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) { |
1433 | 1433 | if (isset($mapping['id']) && $mapping['id'] === true) { |
1434 | - throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1434 | + throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1435 | 1435 | } |
1436 | 1436 | |
1437 | 1437 | $mapping['requireSQLConversion'] = true; |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | /** |
668 | 668 | * Gets the ReflectionProperties of the mapped class. |
669 | 669 | * |
670 | - * @return array An array of ReflectionProperty instances. |
|
670 | + * @return \ReflectionProperty[] An array of ReflectionProperty instances. |
|
671 | 671 | */ |
672 | 672 | public function getReflectionProperties() |
673 | 673 | { |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | * - reflClass (ReflectionClass) |
806 | 806 | * - reflFields (ReflectionProperty array) |
807 | 807 | * |
808 | - * @return array The names of all the fields that should be serialized. |
|
808 | + * @return string[] The names of all the fields that should be serialized. |
|
809 | 809 | */ |
810 | 810 | public function __sleep() |
811 | 811 | { |
@@ -1838,7 +1838,7 @@ discard block |
||
1838 | 1838 | * Sets the mapped identifier/primary key fields of this class. |
1839 | 1839 | * Mainly used by the ClassMetadataFactory to assign inherited identifiers. |
1840 | 1840 | * |
1841 | - * @param array $identifier |
|
1841 | + * @param string[] $identifier |
|
1842 | 1842 | * |
1843 | 1843 | * @return void |
1844 | 1844 | */ |
@@ -1867,7 +1867,7 @@ discard block |
||
1867 | 1867 | /** |
1868 | 1868 | * Gets an array containing all the column names. |
1869 | 1869 | * |
1870 | - * @param array|null $fieldNames |
|
1870 | + * @param string[] $fieldNames |
|
1871 | 1871 | * |
1872 | 1872 | * @return array |
1873 | 1873 | */ |
@@ -2085,7 +2085,7 @@ discard block |
||
2085 | 2085 | /** |
2086 | 2086 | * Sets the mapped subclasses of this class. |
2087 | 2087 | * |
2088 | - * @param array $subclasses The names of all mapped subclasses. |
|
2088 | + * @param string[] $subclasses The names of all mapped subclasses. |
|
2089 | 2089 | * |
2090 | 2090 | * @return void |
2091 | 2091 | */ |
@@ -2101,7 +2101,7 @@ discard block |
||
2101 | 2101 | * Assumes that the class names in the passed array are in the order: |
2102 | 2102 | * directParent -> directParentParent -> directParentParentParent ... -> root. |
2103 | 2103 | * |
2104 | - * @param array $classNames |
|
2104 | + * @param string[] $classNames |
|
2105 | 2105 | * |
2106 | 2106 | * @return void |
2107 | 2107 | */ |
@@ -2638,7 +2638,7 @@ discard block |
||
2638 | 2638 | * @deprecated Deprecated since version 2.4 in favor of \Doctrine\ORM\Event\ListenersInvoker |
2639 | 2639 | * |
2640 | 2640 | * @param string $lifecycleEvent The lifecycle event. |
2641 | - * @param object $entity The Entity on which the event occurred. |
|
2641 | + * @param \Doctrine\Tests\ORM\Functional\Ticket\DDC1707Child $entity The Entity on which the event occurred. |
|
2642 | 2642 | * |
2643 | 2643 | * @return void |
2644 | 2644 | */ |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | public function getSingleIdReflectionProperty() |
697 | 697 | { |
698 | 698 | if ($this->isIdentifierComposite) { |
699 | - throw new BadMethodCallException("Class " . $this->name . " has a composite identifier."); |
|
699 | + throw new BadMethodCallException("Class ".$this->name." has a composite identifier."); |
|
700 | 700 | } |
701 | 701 | |
702 | 702 | return $this->reflFields[$this->identifier[0]]; |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | */ |
780 | 780 | public function getFieldValue($entity, $field) |
781 | 781 | { |
782 | - if (!$entity instanceof $this->reflFields[$field]->class) { |
|
782 | + if ( ! $entity instanceof $this->reflFields[$field]->class) { |
|
783 | 783 | return null; |
784 | 784 | } |
785 | 785 | |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | */ |
796 | 796 | public function __toString() |
797 | 797 | { |
798 | - return __CLASS__ . '@' . spl_object_hash($this); |
|
798 | + return __CLASS__.'@'.spl_object_hash($this); |
|
799 | 799 | } |
800 | 800 | |
801 | 801 | /** |
@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | public function validateAssociations() |
1025 | 1025 | { |
1026 | 1026 | foreach ($this->associationMappings as $mapping) { |
1027 | - if ( ! ClassLoader::classExists($mapping['targetEntity']) ) { |
|
1027 | + if ( ! ClassLoader::classExists($mapping['targetEntity'])) { |
|
1028 | 1028 | throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); |
1029 | 1029 | } |
1030 | 1030 | } |
@@ -1084,7 +1084,7 @@ discard block |
||
1084 | 1084 | */ |
1085 | 1085 | public function enableAssociationCache($fieldName, array $cache) |
1086 | 1086 | { |
1087 | - $this->associationMappings[$fieldName]['cache'] = $this->getAssociationCacheDefaults ($fieldName, $cache); |
|
1087 | + $this->associationMappings[$fieldName]['cache'] = $this->getAssociationCacheDefaults($fieldName, $cache); |
|
1088 | 1088 | } |
1089 | 1089 | |
1090 | 1090 | /** |
@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | } |
1103 | 1103 | |
1104 | 1104 | if ( ! isset($cache['region'])) { |
1105 | - $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; |
|
1105 | + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName; |
|
1106 | 1106 | } |
1107 | 1107 | |
1108 | 1108 | return $cache; |
@@ -1465,7 +1465,7 @@ discard block |
||
1465 | 1465 | $mapping['isOwningSide'] = true; // assume owning side until we hit mappedBy |
1466 | 1466 | |
1467 | 1467 | // unset optional indexBy attribute if its empty |
1468 | - if ( ! isset($mapping['indexBy']) || !$mapping['indexBy']) { |
|
1468 | + if ( ! isset($mapping['indexBy']) || ! $mapping['indexBy']) { |
|
1469 | 1469 | unset($mapping['indexBy']); |
1470 | 1470 | } |
1471 | 1471 | |
@@ -1504,7 +1504,7 @@ discard block |
||
1504 | 1504 | $this->isIdentifierComposite = true; |
1505 | 1505 | } |
1506 | 1506 | |
1507 | - if ($this->cache && !isset($mapping['cache'])) { |
|
1507 | + if ($this->cache && ! isset($mapping['cache'])) { |
|
1508 | 1508 | throw CacheException::nonCacheableEntityAssociation($this->name, $mapping['fieldName']); |
1509 | 1509 | } |
1510 | 1510 | } |
@@ -1636,7 +1636,7 @@ discard block |
||
1636 | 1636 | throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); |
1637 | 1637 | } |
1638 | 1638 | |
1639 | - $this->table['uniqueConstraints'][$mapping['fieldName'] . "_uniq"] = array( |
|
1639 | + $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = array( |
|
1640 | 1640 | 'columns' => $uniqueConstraintColumns |
1641 | 1641 | ); |
1642 | 1642 | } |
@@ -1651,7 +1651,7 @@ discard block |
||
1651 | 1651 | unset($mapping['unique']); |
1652 | 1652 | } |
1653 | 1653 | |
1654 | - if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
|
1654 | + if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) { |
|
1655 | 1655 | throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
1656 | 1656 | } |
1657 | 1657 | |
@@ -1709,7 +1709,7 @@ discard block |
||
1709 | 1709 | } |
1710 | 1710 | |
1711 | 1711 | $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
1712 | - && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1712 | + && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1713 | 1713 | |
1714 | 1714 | if ( ! isset($mapping['joinTable']['joinColumns'])) { |
1715 | 1715 | $mapping['joinTable']['joinColumns'] = array( |
@@ -1902,7 +1902,7 @@ discard block |
||
1902 | 1902 | |
1903 | 1903 | // Association defined as Id field |
1904 | 1904 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
1905 | - $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1905 | + $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1906 | 1906 | |
1907 | 1907 | $columnNames = array_merge($columnNames, $assocColumnNames); |
1908 | 1908 | } |
@@ -2083,7 +2083,7 @@ discard block |
||
2083 | 2083 | public function getTemporaryIdTableName() |
2084 | 2084 | { |
2085 | 2085 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
2086 | - return str_replace('.', '_', $this->getTableName() . '_id_tmp'); |
|
2086 | + return str_replace('.', '_', $this->getTableName().'_id_tmp'); |
|
2087 | 2087 | } |
2088 | 2088 | |
2089 | 2089 | /** |
@@ -2412,7 +2412,7 @@ discard block |
||
2412 | 2412 | */ |
2413 | 2413 | public function addNamedQuery(array $queryMapping) |
2414 | 2414 | { |
2415 | - if (!isset($queryMapping['name'])) { |
|
2415 | + if ( ! isset($queryMapping['name'])) { |
|
2416 | 2416 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2417 | 2417 | } |
2418 | 2418 | |
@@ -2420,7 +2420,7 @@ discard block |
||
2420 | 2420 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2421 | 2421 | } |
2422 | 2422 | |
2423 | - if (!isset($queryMapping['query'])) { |
|
2423 | + if ( ! isset($queryMapping['query'])) { |
|
2424 | 2424 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2425 | 2425 | } |
2426 | 2426 | |
@@ -2447,7 +2447,7 @@ discard block |
||
2447 | 2447 | */ |
2448 | 2448 | public function addNamedNativeQuery(array $queryMapping) |
2449 | 2449 | { |
2450 | - if (!isset($queryMapping['name'])) { |
|
2450 | + if ( ! isset($queryMapping['name'])) { |
|
2451 | 2451 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2452 | 2452 | } |
2453 | 2453 | |
@@ -2455,11 +2455,11 @@ discard block |
||
2455 | 2455 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2456 | 2456 | } |
2457 | 2457 | |
2458 | - if (!isset($queryMapping['query'])) { |
|
2458 | + if ( ! isset($queryMapping['query'])) { |
|
2459 | 2459 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2460 | 2460 | } |
2461 | 2461 | |
2462 | - if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) { |
|
2462 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
2463 | 2463 | throw MappingException::missingQueryMapping($this->name, $queryMapping['name']); |
2464 | 2464 | } |
2465 | 2465 | |
@@ -2491,7 +2491,7 @@ discard block |
||
2491 | 2491 | */ |
2492 | 2492 | public function addSqlResultSetMapping(array $resultMapping) |
2493 | 2493 | { |
2494 | - if (!isset($resultMapping['name'])) { |
|
2494 | + if ( ! isset($resultMapping['name'])) { |
|
2495 | 2495 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name); |
2496 | 2496 | } |
2497 | 2497 | |
@@ -2501,7 +2501,7 @@ discard block |
||
2501 | 2501 | |
2502 | 2502 | if (isset($resultMapping['entities'])) { |
2503 | 2503 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
2504 | - if (!isset($entityResult['entityClass'])) { |
|
2504 | + if ( ! isset($entityResult['entityClass'])) { |
|
2505 | 2505 | throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']); |
2506 | 2506 | } |
2507 | 2507 | |
@@ -2520,11 +2520,11 @@ discard block |
||
2520 | 2520 | |
2521 | 2521 | if (isset($entityResult['fields'])) { |
2522 | 2522 | foreach ($entityResult['fields'] as $k => $field) { |
2523 | - if (!isset($field['name'])) { |
|
2523 | + if ( ! isset($field['name'])) { |
|
2524 | 2524 | throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']); |
2525 | 2525 | } |
2526 | 2526 | |
2527 | - if (!isset($field['column'])) { |
|
2527 | + if ( ! isset($field['column'])) { |
|
2528 | 2528 | $fieldName = $field['name']; |
2529 | 2529 | if (strpos($fieldName, '.')) { |
2530 | 2530 | list(, $fieldName) = explode('.', $fieldName); |
@@ -3015,7 +3015,7 @@ discard block |
||
3015 | 3015 | } |
3016 | 3016 | |
3017 | 3017 | if ($definition['sequenceName'][0] == '`') { |
3018 | - $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3018 | + $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3019 | 3019 | $definition['quoted'] = true; |
3020 | 3020 | } |
3021 | 3021 | |
@@ -3107,7 +3107,7 @@ discard block |
||
3107 | 3107 | public function getAssociationTargetClass($assocName) |
3108 | 3108 | { |
3109 | 3109 | if ( ! isset($this->associationMappings[$assocName])) { |
3110 | - throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); |
|
3110 | + throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association."); |
|
3111 | 3111 | } |
3112 | 3112 | |
3113 | 3113 | return $this->associationMappings[$assocName]['targetEntity']; |
@@ -3146,7 +3146,7 @@ discard block |
||
3146 | 3146 | // Association defined as Id field |
3147 | 3147 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
3148 | 3148 | $assocQuotedColumnNames = array_map( |
3149 | - function ($joinColumn) use ($platform) { |
|
3149 | + function($joinColumn) use ($platform) { |
|
3150 | 3150 | return isset($joinColumn['quoted']) |
3151 | 3151 | ? $platform->quoteIdentifier($joinColumn['name']) |
3152 | 3152 | : $joinColumn['name']; |
@@ -3257,7 +3257,7 @@ discard block |
||
3257 | 3257 | } |
3258 | 3258 | |
3259 | 3259 | if ($className !== null && strpos($className, '\\') === false && strlen($this->namespace) > 0) { |
3260 | - return $this->namespace . '\\' . $className; |
|
3260 | + return $this->namespace.'\\'.$className; |
|
3261 | 3261 | } |
3262 | 3262 | |
3263 | 3263 | return $className; |
@@ -3311,15 +3311,15 @@ discard block |
||
3311 | 3311 | ? $fieldMapping['originalClass'] |
3312 | 3312 | : $embeddable->name; |
3313 | 3313 | $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) |
3314 | - ? $property . '.' . $fieldMapping['declaredField'] |
|
3314 | + ? $property.'.'.$fieldMapping['declaredField'] |
|
3315 | 3315 | : $property; |
3316 | 3316 | $fieldMapping['originalField'] = isset($fieldMapping['originalField']) |
3317 | 3317 | ? $fieldMapping['originalField'] |
3318 | 3318 | : $fieldMapping['fieldName']; |
3319 | - $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName']; |
|
3319 | + $fieldMapping['fieldName'] = $property.".".$fieldMapping['fieldName']; |
|
3320 | 3320 | |
3321 | - if (! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3322 | - $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName']; |
|
3321 | + if ( ! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3322 | + $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'].$fieldMapping['columnName']; |
|
3323 | 3323 | } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) { |
3324 | 3324 | $fieldMapping['columnName'] = $this->namingStrategy |
3325 | 3325 | ->embeddedFieldToColumnName( |
@@ -3360,7 +3360,7 @@ discard block |
||
3360 | 3360 | { |
3361 | 3361 | $sequencePrefix = $this->getSequencePrefix($platform); |
3362 | 3362 | $columnName = $this->getSingleIdentifierColumnName(); |
3363 | - $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; |
|
3363 | + $sequenceName = $sequencePrefix.'_'.$columnName.'_seq'; |
|
3364 | 3364 | |
3365 | 3365 | return $sequenceName; |
3366 | 3366 | } |
@@ -3380,10 +3380,10 @@ discard block |
||
3380 | 3380 | |
3381 | 3381 | // Prepend the schema name to the table name if there is one |
3382 | 3382 | if ($schemaName = $this->getSchemaName()) { |
3383 | - $sequencePrefix = $schemaName . '.' . $tableName; |
|
3383 | + $sequencePrefix = $schemaName.'.'.$tableName; |
|
3384 | 3384 | |
3385 | 3385 | if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { |
3386 | - $sequencePrefix = $schemaName . '__' . $tableName; |
|
3386 | + $sequencePrefix = $schemaName.'__'.$tableName; |
|
3387 | 3387 | } |
3388 | 3388 | } |
3389 | 3389 |
@@ -275,7 +275,7 @@ |
||
275 | 275 | { |
276 | 276 | $cm = $this->builder->getClassMetadata(); |
277 | 277 | if ($this->generatedValue) { |
278 | - $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue)); |
|
278 | + $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'.$this->generatedValue)); |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | if ($this->version) { |
@@ -180,7 +180,7 @@ |
||
180 | 180 | * Sets an option. |
181 | 181 | * |
182 | 182 | * @param string $name |
183 | - * @param mixed $value |
|
183 | + * @param boolean $value |
|
184 | 184 | * |
185 | 185 | * @return FieldBuilder |
186 | 186 | */ |
@@ -150,7 +150,7 @@ |
||
150 | 150 | */ |
151 | 151 | public function addIndex(array $columns, $name) |
152 | 152 | { |
153 | - if (!isset($this->cm->table['indexes'])) { |
|
153 | + if ( ! isset($this->cm->table['indexes'])) { |
|
154 | 154 | $this->cm->table['indexes'] = array(); |
155 | 155 | } |
156 | 156 |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | /** |
144 | 144 | * Adds Index. |
145 | 145 | * |
146 | - * @param array $columns |
|
146 | + * @param string[] $columns |
|
147 | 147 | * @param string $name |
148 | 148 | * |
149 | 149 | * @return ClassMetadataBuilder |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | /** |
163 | 163 | * Adds Unique Constraint. |
164 | 164 | * |
165 | - * @param array $columns |
|
165 | + * @param string[] $columns |
|
166 | 166 | * @param string $name |
167 | 167 | * |
168 | 168 | * @return ClassMetadataBuilder |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | protected function onNotFoundMetadata($className) |
107 | 107 | { |
108 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
108 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
109 | 109 | return; |
110 | 110 | } |
111 | 111 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $this->completeIdGeneratorMapping($class); |
163 | 163 | } |
164 | 164 | |
165 | - if (!$class->isMappedSuperclass) { |
|
165 | + if ( ! $class->isMappedSuperclass) { |
|
166 | 166 | foreach ($class->embeddedClasses as $property => $embeddableClass) { |
167 | 167 | |
168 | 168 | if (isset($embeddableClass['inherited'])) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | $identifier = $embeddableMetadata->getIdentifier(); |
189 | 189 | |
190 | - if (! empty($identifier)) { |
|
190 | + if ( ! empty($identifier)) { |
|
191 | 191 | $this->inheritIdGeneratorMapping($class, $embeddableMetadata); |
192 | 192 | } |
193 | 193 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | */ |
258 | 258 | protected function validateRuntimeMetadata($class, $parent) |
259 | 259 | { |
260 | - if ( ! $class->reflClass ) { |
|
260 | + if ( ! $class->reflClass) { |
|
261 | 261 | // only validate if there is a reflection class instance |
262 | 262 | return; |
263 | 263 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
268 | 268 | |
269 | 269 | // verify inheritance |
270 | - if ( ! $class->isMappedSuperclass && !$class->isInheritanceTypeNone()) { |
|
270 | + if ( ! $class->isMappedSuperclass && ! $class->isInheritanceTypeNone()) { |
|
271 | 271 | if ( ! $parent) { |
272 | 272 | if (count($class->discriminatorMap) == 0) { |
273 | 273 | throw MappingException::missingDiscriminatorMap($class->name); |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | { |
429 | 429 | foreach ($parentClass->associationMappings as $field => $mapping) { |
430 | 430 | if ($parentClass->isMappedSuperclass) { |
431 | - if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) { |
|
431 | + if ($mapping['type'] & ClassMetadata::TO_MANY && ! $mapping['isOwningSide']) { |
|
432 | 432 | throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field); |
433 | 433 | } |
434 | 434 | $mapping['sourceEntity'] = $subClass->name; |
@@ -476,11 +476,11 @@ discard block |
||
476 | 476 | $embeddableMetadata = $this->getMetadataFor($embeddableClass['class']); |
477 | 477 | |
478 | 478 | $parentClass->mapEmbedded(array( |
479 | - 'fieldName' => $prefix . '.' . $property, |
|
479 | + 'fieldName' => $prefix.'.'.$property, |
|
480 | 480 | 'class' => $embeddableMetadata->name, |
481 | 481 | 'columnPrefix' => $embeddableClass['columnPrefix'], |
482 | 482 | 'declaredField' => $embeddableClass['declaredField'] |
483 | - ? $prefix . '.' . $embeddableClass['declaredField'] |
|
483 | + ? $prefix.'.'.$embeddableClass['declaredField'] |
|
484 | 484 | : $prefix, |
485 | 485 | 'originalField' => $embeddableClass['originalField'] ?: $property, |
486 | 486 | )); |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | */ |
498 | 498 | private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass) |
499 | 499 | { |
500 | - if (! $parentClass->isMappedSuperclass) { |
|
500 | + if ( ! $parentClass->isMappedSuperclass) { |
|
501 | 501 | return; |
502 | 502 | } |
503 | 503 | |
@@ -696,14 +696,14 @@ discard block |
||
696 | 696 | case ClassMetadata::GENERATOR_TYPE_CUSTOM: |
697 | 697 | $definition = $class->customGeneratorDefinition; |
698 | 698 | if ( ! class_exists($definition['class'])) { |
699 | - throw new ORMException("Can't instantiate custom generator : " . |
|
699 | + throw new ORMException("Can't instantiate custom generator : ". |
|
700 | 700 | $definition['class']); |
701 | 701 | } |
702 | 702 | $class->setIdGenerator(new $definition['class']); |
703 | 703 | break; |
704 | 704 | |
705 | 705 | default: |
706 | - throw new ORMException("Unknown generator type: " . $class->generatorType); |
|
706 | + throw new ORMException("Unknown generator type: ".$class->generatorType); |
|
707 | 707 | } |
708 | 708 | } |
709 | 709 | |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | */ |
754 | 754 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) |
755 | 755 | { |
756 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
756 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
757 | 757 | } |
758 | 758 | |
759 | 759 | /** |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | */ |
778 | 778 | private function getTargetPlatform() |
779 | 779 | { |
780 | - if (!$this->targetPlatform) { |
|
780 | + if ( ! $this->targetPlatform) { |
|
781 | 781 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
782 | 782 | } |
783 | 783 |
@@ -67,7 +67,7 @@ |
||
67 | 67 | public function resolve($className) |
68 | 68 | { |
69 | 69 | if (isset($this->instances[$className = trim($className, '\\')])) { |
70 | - return $this->instances[$className]; |
|
70 | + return $this->instances[$className]; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $this->instances[$className] = new $className(); |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | */ |
42 | 42 | abstract class AbstractEntityPersister implements CachedEntityPersister |
43 | 43 | { |
44 | - /** |
|
45 | - * @var \Doctrine\ORM\UnitOfWork |
|
46 | - */ |
|
44 | + /** |
|
45 | + * @var \Doctrine\ORM\UnitOfWork |
|
46 | + */ |
|
47 | 47 | protected $uow; |
48 | 48 | |
49 | 49 | /** |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | */ |
62 | 62 | protected $class; |
63 | 63 | |
64 | - /** |
|
65 | - * @var array |
|
66 | - */ |
|
64 | + /** |
|
65 | + * @var array |
|
66 | + */ |
|
67 | 67 | protected $queuedCache = array(); |
68 | 68 | |
69 | 69 | /** |
@@ -715,9 +715,9 @@ |
||
715 | 715 | ); |
716 | 716 | } |
717 | 717 | |
718 | - /** |
|
719 | - * {@inheritdoc} |
|
720 | - */ |
|
718 | + /** |
|
719 | + * {@inheritdoc} |
|
720 | + */ |
|
721 | 721 | protected function getHash() |
722 | 722 | { |
723 | 723 | return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults); |
@@ -220,7 +220,7 @@ |
||
220 | 220 | $exporter->setMetadata($metadata); |
221 | 221 | $exporter->export(); |
222 | 222 | |
223 | - $output->writeln(PHP_EOL . sprintf( |
|
223 | + $output->writeln(PHP_EOL.sprintf( |
|
224 | 224 | 'Converting Doctrine 1.X schema to "<info>%s</info>" mapping type in "<info>%s</info>"', $toType, $destPath |
225 | 225 | )); |
226 | 226 | } else { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | /** |
34 | 34 | * @var string |
35 | 35 | */ |
36 | - protected $preSeparator = ''; |
|
36 | + protected $preSeparator = ''; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var string |