@@ -155,9 +155,9 @@ |
||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | if ($property->isProtected()) { |
| 158 | - return "\0*\0" . $propertyName; |
|
| 158 | + return "\0*\0".$propertyName; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $propertyName; |
|
| 161 | + return "\0".$property->getDeclaringClass()->getName()."\0".$propertyName; |
|
| 162 | 162 | } |
| 163 | 163 | } |
@@ -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; |
@@ -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]]; |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | */ |
| 792 | 792 | public function __toString() |
| 793 | 793 | { |
| 794 | - return __CLASS__ . '@' . spl_object_hash($this); |
|
| 794 | + return __CLASS__.'@'.spl_object_hash($this); |
|
| 795 | 795 | } |
| 796 | 796 | |
| 797 | 797 | /** |
@@ -1020,7 +1020,7 @@ discard block |
||
| 1020 | 1020 | public function validateAssociations() |
| 1021 | 1021 | { |
| 1022 | 1022 | foreach ($this->associationMappings as $mapping) { |
| 1023 | - if ( ! ClassLoader::classExists($mapping['targetEntity']) ) { |
|
| 1023 | + if ( ! ClassLoader::classExists($mapping['targetEntity'])) { |
|
| 1024 | 1024 | throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); |
| 1025 | 1025 | } |
| 1026 | 1026 | } |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | */ |
| 1081 | 1081 | public function enableAssociationCache($fieldName, array $cache) |
| 1082 | 1082 | { |
| 1083 | - $this->associationMappings[$fieldName]['cache'] = $this->getAssociationCacheDefaults ($fieldName, $cache); |
|
| 1083 | + $this->associationMappings[$fieldName]['cache'] = $this->getAssociationCacheDefaults($fieldName, $cache); |
|
| 1084 | 1084 | } |
| 1085 | 1085 | |
| 1086 | 1086 | /** |
@@ -1098,7 +1098,7 @@ discard block |
||
| 1098 | 1098 | } |
| 1099 | 1099 | |
| 1100 | 1100 | if ( ! isset($cache['region'])) { |
| 1101 | - $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; |
|
| 1101 | + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName; |
|
| 1102 | 1102 | } |
| 1103 | 1103 | |
| 1104 | 1104 | return $cache; |
@@ -1461,7 +1461,7 @@ discard block |
||
| 1461 | 1461 | $mapping['isOwningSide'] = true; // assume owning side until we hit mappedBy |
| 1462 | 1462 | |
| 1463 | 1463 | // unset optional indexBy attribute if its empty |
| 1464 | - if ( ! isset($mapping['indexBy']) || !$mapping['indexBy']) { |
|
| 1464 | + if ( ! isset($mapping['indexBy']) || ! $mapping['indexBy']) { |
|
| 1465 | 1465 | unset($mapping['indexBy']); |
| 1466 | 1466 | } |
| 1467 | 1467 | |
@@ -1500,7 +1500,7 @@ discard block |
||
| 1500 | 1500 | $this->isIdentifierComposite = true; |
| 1501 | 1501 | } |
| 1502 | 1502 | |
| 1503 | - if ($this->cache && !isset($mapping['cache'])) { |
|
| 1503 | + if ($this->cache && ! isset($mapping['cache'])) { |
|
| 1504 | 1504 | throw CacheException::nonCacheableEntityAssociation($this->name, $mapping['fieldName']); |
| 1505 | 1505 | } |
| 1506 | 1506 | } |
@@ -1632,7 +1632,7 @@ discard block |
||
| 1632 | 1632 | throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); |
| 1633 | 1633 | } |
| 1634 | 1634 | |
| 1635 | - $this->table['uniqueConstraints'][$mapping['fieldName'] . "_uniq"] = array( |
|
| 1635 | + $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = array( |
|
| 1636 | 1636 | 'columns' => $uniqueConstraintColumns |
| 1637 | 1637 | ); |
| 1638 | 1638 | } |
@@ -1647,7 +1647,7 @@ discard block |
||
| 1647 | 1647 | unset($mapping['unique']); |
| 1648 | 1648 | } |
| 1649 | 1649 | |
| 1650 | - if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
|
| 1650 | + if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) { |
|
| 1651 | 1651 | throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
| 1652 | 1652 | } |
| 1653 | 1653 | |
@@ -1705,7 +1705,7 @@ discard block |
||
| 1705 | 1705 | } |
| 1706 | 1706 | |
| 1707 | 1707 | $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
| 1708 | - && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
| 1708 | + && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
| 1709 | 1709 | |
| 1710 | 1710 | if ( ! isset($mapping['joinTable']['joinColumns'])) { |
| 1711 | 1711 | $mapping['joinTable']['joinColumns'] = array( |
@@ -1898,7 +1898,7 @@ discard block |
||
| 1898 | 1898 | |
| 1899 | 1899 | // Association defined as Id field |
| 1900 | 1900 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
| 1901 | - $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
| 1901 | + $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
| 1902 | 1902 | |
| 1903 | 1903 | $columnNames = array_merge($columnNames, $assocColumnNames); |
| 1904 | 1904 | } |
@@ -2079,7 +2079,7 @@ discard block |
||
| 2079 | 2079 | public function getTemporaryIdTableName() |
| 2080 | 2080 | { |
| 2081 | 2081 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
| 2082 | - return str_replace('.', '_', $this->getTableName() . '_id_tmp'); |
|
| 2082 | + return str_replace('.', '_', $this->getTableName().'_id_tmp'); |
|
| 2083 | 2083 | } |
| 2084 | 2084 | |
| 2085 | 2085 | /** |
@@ -2408,7 +2408,7 @@ discard block |
||
| 2408 | 2408 | */ |
| 2409 | 2409 | public function addNamedQuery(array $queryMapping) |
| 2410 | 2410 | { |
| 2411 | - if (!isset($queryMapping['name'])) { |
|
| 2411 | + if ( ! isset($queryMapping['name'])) { |
|
| 2412 | 2412 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
| 2413 | 2413 | } |
| 2414 | 2414 | |
@@ -2416,7 +2416,7 @@ discard block |
||
| 2416 | 2416 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
| 2417 | 2417 | } |
| 2418 | 2418 | |
| 2419 | - if (!isset($queryMapping['query'])) { |
|
| 2419 | + if ( ! isset($queryMapping['query'])) { |
|
| 2420 | 2420 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
| 2421 | 2421 | } |
| 2422 | 2422 | |
@@ -2443,7 +2443,7 @@ discard block |
||
| 2443 | 2443 | */ |
| 2444 | 2444 | public function addNamedNativeQuery(array $queryMapping) |
| 2445 | 2445 | { |
| 2446 | - if (!isset($queryMapping['name'])) { |
|
| 2446 | + if ( ! isset($queryMapping['name'])) { |
|
| 2447 | 2447 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
| 2448 | 2448 | } |
| 2449 | 2449 | |
@@ -2451,11 +2451,11 @@ discard block |
||
| 2451 | 2451 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
| 2452 | 2452 | } |
| 2453 | 2453 | |
| 2454 | - if (!isset($queryMapping['query'])) { |
|
| 2454 | + if ( ! isset($queryMapping['query'])) { |
|
| 2455 | 2455 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
| 2456 | 2456 | } |
| 2457 | 2457 | |
| 2458 | - if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) { |
|
| 2458 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
| 2459 | 2459 | throw MappingException::missingQueryMapping($this->name, $queryMapping['name']); |
| 2460 | 2460 | } |
| 2461 | 2461 | |
@@ -2487,7 +2487,7 @@ discard block |
||
| 2487 | 2487 | */ |
| 2488 | 2488 | public function addSqlResultSetMapping(array $resultMapping) |
| 2489 | 2489 | { |
| 2490 | - if (!isset($resultMapping['name'])) { |
|
| 2490 | + if ( ! isset($resultMapping['name'])) { |
|
| 2491 | 2491 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name); |
| 2492 | 2492 | } |
| 2493 | 2493 | |
@@ -2497,7 +2497,7 @@ discard block |
||
| 2497 | 2497 | |
| 2498 | 2498 | if (isset($resultMapping['entities'])) { |
| 2499 | 2499 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
| 2500 | - if (!isset($entityResult['entityClass'])) { |
|
| 2500 | + if ( ! isset($entityResult['entityClass'])) { |
|
| 2501 | 2501 | throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']); |
| 2502 | 2502 | } |
| 2503 | 2503 | |
@@ -2516,11 +2516,11 @@ discard block |
||
| 2516 | 2516 | |
| 2517 | 2517 | if (isset($entityResult['fields'])) { |
| 2518 | 2518 | foreach ($entityResult['fields'] as $k => $field) { |
| 2519 | - if (!isset($field['name'])) { |
|
| 2519 | + if ( ! isset($field['name'])) { |
|
| 2520 | 2520 | throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']); |
| 2521 | 2521 | } |
| 2522 | 2522 | |
| 2523 | - if (!isset($field['column'])) { |
|
| 2523 | + if ( ! isset($field['column'])) { |
|
| 2524 | 2524 | $fieldName = $field['name']; |
| 2525 | 2525 | if (strpos($fieldName, '.')) { |
| 2526 | 2526 | list(, $fieldName) = explode('.', $fieldName); |
@@ -3011,7 +3011,7 @@ discard block |
||
| 3011 | 3011 | } |
| 3012 | 3012 | |
| 3013 | 3013 | if ($definition['sequenceName'][0] == '`') { |
| 3014 | - $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
| 3014 | + $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
| 3015 | 3015 | $definition['quoted'] = true; |
| 3016 | 3016 | } |
| 3017 | 3017 | |
@@ -3103,7 +3103,7 @@ discard block |
||
| 3103 | 3103 | public function getAssociationTargetClass($assocName) |
| 3104 | 3104 | { |
| 3105 | 3105 | if ( ! isset($this->associationMappings[$assocName])) { |
| 3106 | - throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); |
|
| 3106 | + throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association."); |
|
| 3107 | 3107 | } |
| 3108 | 3108 | |
| 3109 | 3109 | return $this->associationMappings[$assocName]['targetEntity']; |
@@ -3142,7 +3142,7 @@ discard block |
||
| 3142 | 3142 | // Association defined as Id field |
| 3143 | 3143 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
| 3144 | 3144 | $assocQuotedColumnNames = array_map( |
| 3145 | - function ($joinColumn) use ($platform) { |
|
| 3145 | + function($joinColumn) use ($platform) { |
|
| 3146 | 3146 | return isset($joinColumn['quoted']) |
| 3147 | 3147 | ? $platform->quoteIdentifier($joinColumn['name']) |
| 3148 | 3148 | : $joinColumn['name']; |
@@ -3253,7 +3253,7 @@ discard block |
||
| 3253 | 3253 | } |
| 3254 | 3254 | |
| 3255 | 3255 | if ($className !== null && strpos($className, '\\') === false && strlen($this->namespace) > 0) { |
| 3256 | - return $this->namespace . '\\' . $className; |
|
| 3256 | + return $this->namespace.'\\'.$className; |
|
| 3257 | 3257 | } |
| 3258 | 3258 | |
| 3259 | 3259 | return $className; |
@@ -3307,15 +3307,15 @@ discard block |
||
| 3307 | 3307 | ? $fieldMapping['originalClass'] |
| 3308 | 3308 | : $embeddable->name; |
| 3309 | 3309 | $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) |
| 3310 | - ? $property . '.' . $fieldMapping['declaredField'] |
|
| 3310 | + ? $property.'.'.$fieldMapping['declaredField'] |
|
| 3311 | 3311 | : $property; |
| 3312 | 3312 | $fieldMapping['originalField'] = isset($fieldMapping['originalField']) |
| 3313 | 3313 | ? $fieldMapping['originalField'] |
| 3314 | 3314 | : $fieldMapping['fieldName']; |
| 3315 | - $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName']; |
|
| 3315 | + $fieldMapping['fieldName'] = $property.".".$fieldMapping['fieldName']; |
|
| 3316 | 3316 | |
| 3317 | - if (! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
| 3318 | - $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName']; |
|
| 3317 | + if ( ! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
| 3318 | + $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'].$fieldMapping['columnName']; |
|
| 3319 | 3319 | } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) { |
| 3320 | 3320 | $fieldMapping['columnName'] = $this->namingStrategy |
| 3321 | 3321 | ->embeddedFieldToColumnName( |
@@ -3356,7 +3356,7 @@ discard block |
||
| 3356 | 3356 | { |
| 3357 | 3357 | $sequencePrefix = $this->getSequencePrefix($platform); |
| 3358 | 3358 | $columnName = $this->getSingleIdentifierColumnName(); |
| 3359 | - $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; |
|
| 3359 | + $sequenceName = $sequencePrefix.'_'.$columnName.'_seq'; |
|
| 3360 | 3360 | |
| 3361 | 3361 | return $sequenceName; |
| 3362 | 3362 | } |
@@ -3376,10 +3376,10 @@ discard block |
||
| 3376 | 3376 | |
| 3377 | 3377 | // Prepend the schema name to the table name if there is one |
| 3378 | 3378 | if ($schemaName = $this->getSchemaName()) { |
| 3379 | - $sequencePrefix = $schemaName . '.' . $tableName; |
|
| 3379 | + $sequencePrefix = $schemaName.'.'.$tableName; |
|
| 3380 | 3380 | |
| 3381 | 3381 | if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { |
| 3382 | - $sequencePrefix = $schemaName . '__' . $tableName; |
|
| 3382 | + $sequencePrefix = $schemaName.'__'.$tableName; |
|
| 3383 | 3383 | } |
| 3384 | 3384 | } |
| 3385 | 3385 | |
@@ -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 | */ |
@@ -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(); |
@@ -19,7 +19,6 @@ |
||
| 19 | 19 | |
| 20 | 20 | namespace Doctrine\ORM\Query; |
| 21 | 21 | |
| 22 | -use Doctrine\DBAL\Types\Type; |
|
| 23 | 22 | use Doctrine\ORM\EntityManagerInterface; |
| 24 | 23 | use Doctrine\ORM\Mapping\ClassMetadataInfo; |
| 25 | 24 | use Doctrine\ORM\Mapping\MappingException; |
@@ -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); |