@@ -152,7 +152,7 @@ |
||
152 | 152 | */ |
153 | 153 | public function addIndex(array $columns, $name) |
154 | 154 | { |
155 | - if (!isset($this->cm->table['indexes'])) { |
|
155 | + if ( ! isset($this->cm->table['indexes'])) { |
|
156 | 156 | $this->cm->table['indexes'] = []; |
157 | 157 | } |
158 | 158 |
@@ -1428,7 +1428,7 @@ |
||
1428 | 1428 | |
1429 | 1429 | if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) { |
1430 | 1430 | if (isset($mapping['id']) && true === $mapping['id']) { |
1431 | - throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1431 | + throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
|
1432 | 1432 | } |
1433 | 1433 | |
1434 | 1434 | $mapping['requireSQLConversion'] = true; |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | public function getSingleIdReflectionProperty() |
696 | 696 | { |
697 | 697 | if ($this->isIdentifierComposite) { |
698 | - throw new BadMethodCallException("Class " . $this->name . " has a composite identifier."); |
|
698 | + throw new BadMethodCallException("Class ".$this->name." has a composite identifier."); |
|
699 | 699 | } |
700 | 700 | |
701 | 701 | return $this->reflFields[$this->identifier[0]]; |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | */ |
791 | 791 | public function __toString() |
792 | 792 | { |
793 | - return __CLASS__ . '@' . spl_object_hash($this); |
|
793 | + return __CLASS__.'@'.spl_object_hash($this); |
|
794 | 794 | } |
795 | 795 | |
796 | 796 | /** |
@@ -1106,7 +1106,7 @@ discard block |
||
1106 | 1106 | } |
1107 | 1107 | |
1108 | 1108 | if ( ! isset($cache['region'])) { |
1109 | - $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; |
|
1109 | + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName; |
|
1110 | 1110 | } |
1111 | 1111 | |
1112 | 1112 | return $cache; |
@@ -1386,7 +1386,7 @@ discard block |
||
1386 | 1386 | protected function _validateAndCompleteFieldMapping(array &$mapping) |
1387 | 1387 | { |
1388 | 1388 | // Check mandatory fields |
1389 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1389 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1390 | 1390 | throw MappingException::missingFieldName($this->name); |
1391 | 1391 | } |
1392 | 1392 | |
@@ -1499,14 +1499,14 @@ discard block |
||
1499 | 1499 | $this->isIdentifierComposite = true; |
1500 | 1500 | } |
1501 | 1501 | |
1502 | - if ($this->cache && !isset($mapping['cache'])) { |
|
1502 | + if ($this->cache && ! isset($mapping['cache'])) { |
|
1503 | 1503 | throw CacheException::nonCacheableEntityAssociation($this->name, $mapping['fieldName']); |
1504 | 1504 | } |
1505 | 1505 | } |
1506 | 1506 | |
1507 | 1507 | // Mandatory attributes for both sides |
1508 | 1508 | // Mandatory: fieldName, targetEntity |
1509 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1509 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1510 | 1510 | throw MappingException::missingFieldName($this->name); |
1511 | 1511 | } |
1512 | 1512 | |
@@ -1628,7 +1628,7 @@ discard block |
||
1628 | 1628 | throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); |
1629 | 1629 | } |
1630 | 1630 | |
1631 | - $this->table['uniqueConstraints'][$mapping['fieldName'] . "_uniq"] = [ |
|
1631 | + $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = [ |
|
1632 | 1632 | 'columns' => $uniqueConstraintColumns |
1633 | 1633 | ]; |
1634 | 1634 | } |
@@ -1643,7 +1643,7 @@ discard block |
||
1643 | 1643 | unset($mapping['unique']); |
1644 | 1644 | } |
1645 | 1645 | |
1646 | - if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
|
1646 | + if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) { |
|
1647 | 1647 | throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
1648 | 1648 | } |
1649 | 1649 | |
@@ -1697,7 +1697,7 @@ discard block |
||
1697 | 1697 | } |
1698 | 1698 | |
1699 | 1699 | $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
1700 | - && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1700 | + && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1701 | 1701 | |
1702 | 1702 | if ( ! isset($mapping['joinTable']['joinColumns'])) { |
1703 | 1703 | $mapping['joinTable']['joinColumns'] = [ |
@@ -1890,7 +1890,7 @@ discard block |
||
1890 | 1890 | |
1891 | 1891 | // Association defined as Id field |
1892 | 1892 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
1893 | - $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1893 | + $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1894 | 1894 | |
1895 | 1895 | $columnNames = array_merge($columnNames, $assocColumnNames); |
1896 | 1896 | } |
@@ -2071,7 +2071,7 @@ discard block |
||
2071 | 2071 | public function getTemporaryIdTableName() |
2072 | 2072 | { |
2073 | 2073 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
2074 | - return str_replace('.', '_', $this->getTableName() . '_id_tmp'); |
|
2074 | + return str_replace('.', '_', $this->getTableName().'_id_tmp'); |
|
2075 | 2075 | } |
2076 | 2076 | |
2077 | 2077 | /** |
@@ -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 | |
@@ -3111,7 +3111,7 @@ discard block |
||
3111 | 3111 | public function getAssociationTargetClass($assocName) |
3112 | 3112 | { |
3113 | 3113 | if ( ! isset($this->associationMappings[$assocName])) { |
3114 | - throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); |
|
3114 | + throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association."); |
|
3115 | 3115 | } |
3116 | 3116 | |
3117 | 3117 | return $this->associationMappings[$assocName]['targetEntity']; |
@@ -3150,7 +3150,7 @@ discard block |
||
3150 | 3150 | // Association defined as Id field |
3151 | 3151 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
3152 | 3152 | $assocQuotedColumnNames = array_map( |
3153 | - function ($joinColumn) use ($platform) { |
|
3153 | + function($joinColumn) use ($platform) { |
|
3154 | 3154 | return isset($joinColumn['quoted']) |
3155 | 3155 | ? $platform->quoteIdentifier($joinColumn['name']) |
3156 | 3156 | : $joinColumn['name']; |
@@ -3261,7 +3261,7 @@ discard block |
||
3261 | 3261 | } |
3262 | 3262 | |
3263 | 3263 | if ($className !== null && strpos($className, '\\') === false && $this->namespace) { |
3264 | - return $this->namespace . '\\' . $className; |
|
3264 | + return $this->namespace.'\\'.$className; |
|
3265 | 3265 | } |
3266 | 3266 | |
3267 | 3267 | return $className; |
@@ -3313,13 +3313,13 @@ discard block |
||
3313 | 3313 | foreach ($embeddable->fieldMappings as $fieldMapping) { |
3314 | 3314 | $fieldMapping['originalClass'] = $fieldMapping['originalClass'] ?? $embeddable->name; |
3315 | 3315 | $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) |
3316 | - ? $property . '.' . $fieldMapping['declaredField'] |
|
3316 | + ? $property.'.'.$fieldMapping['declaredField'] |
|
3317 | 3317 | : $property; |
3318 | 3318 | $fieldMapping['originalField'] = $fieldMapping['originalField'] ?? $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 | |
@@ -3395,8 +3395,8 @@ discard block |
||
3395 | 3395 | */ |
3396 | 3396 | private function assertMappingOrderBy(array $mapping) |
3397 | 3397 | { |
3398 | - if (isset($mapping['orderBy']) && !is_array($mapping['orderBy'])) { |
|
3399 | - throw new InvalidArgumentException("'orderBy' is expected to be an array, not " . gettype($mapping['orderBy'])); |
|
3398 | + if (isset($mapping['orderBy']) && ! is_array($mapping['orderBy'])) { |
|
3399 | + throw new InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy'])); |
|
3400 | 3400 | } |
3401 | 3401 | } |
3402 | 3402 | } |
@@ -30,9 +30,9 @@ |
||
30 | 30 | */ |
31 | 31 | class ReadOnlyCachedCollectionPersister extends NonStrictReadWriteCachedCollectionPersister |
32 | 32 | { |
33 | - /** |
|
34 | - * {@inheritdoc} |
|
35 | - */ |
|
33 | + /** |
|
34 | + * {@inheritdoc} |
|
35 | + */ |
|
36 | 36 | public function update(PersistentCollection $collection) |
37 | 37 | { |
38 | 38 | if ($collection->isDirty() && $collection->getSnapshot()) { |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | */ |
38 | 38 | abstract class AbstractCollectionPersister implements CachedCollectionPersister |
39 | 39 | { |
40 | - /** |
|
41 | - * @var \Doctrine\ORM\UnitOfWork |
|
42 | - */ |
|
40 | + /** |
|
41 | + * @var \Doctrine\ORM\UnitOfWork |
|
42 | + */ |
|
43 | 43 | protected $uow; |
44 | 44 | |
45 | 45 | /** |
@@ -67,9 +67,9 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected $association; |
69 | 69 | |
70 | - /** |
|
71 | - * @var array |
|
72 | - */ |
|
70 | + /** |
|
71 | + * @var array |
|
72 | + */ |
|
73 | 73 | protected $queuedCache = []; |
74 | 74 | |
75 | 75 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function getCacheLogger() |
75 | 75 | { |
76 | - return $this->cacheLogger; |
|
76 | + return $this->cacheLogger; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | ); |
116 | 116 | } |
117 | 117 | |
118 | - return $this->queryValidator; |
|
118 | + return $this->queryValidator; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -153,7 +153,7 @@ |
||
153 | 153 | */ |
154 | 154 | public function newDefaultAnnotationDriver($paths = [], $useSimpleAnnotationReader = true) |
155 | 155 | { |
156 | - AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php'); |
|
156 | + AnnotationRegistry::registerFile(__DIR__.'/Mapping/Driver/DoctrineAnnotations.php'); |
|
157 | 157 | |
158 | 158 | if ($useSimpleAnnotationReader) { |
159 | 159 | // Register the ORM Annotations in the AnnotationRegistry |
@@ -40,12 +40,12 @@ |
||
40 | 40 | $ids = []; |
41 | 41 | |
42 | 42 | foreach ($id as $key => $value) { |
43 | - $ids[] = $key . '(' . $value . ')'; |
|
43 | + $ids[] = $key.'('.$value.')'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | 47 | return new self( |
48 | - 'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found' |
|
48 | + 'Entity of type \''.$className.'\''.($ids ? ' for IDs '.implode(', ', $ids) : '').' was not found' |
|
49 | 49 | ); |
50 | 50 | } |
51 | 51 | } |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | // It's a joined result |
109 | 109 | |
110 | 110 | $parent = $this->_rsm->parentAliasMap[$dqlAlias]; |
111 | - $path = $parent . '.' . $dqlAlias; |
|
111 | + $path = $parent.'.'.$dqlAlias; |
|
112 | 112 | |
113 | 113 | // missing parent data, skipping as RIGHT JOIN hydration is not supported. |
114 | - if ( ! isset($nonemptyComponents[$parent]) ) { |
|
114 | + if ( ! isset($nonemptyComponents[$parent])) { |
|
115 | 115 | continue; |
116 | 116 | } |
117 | 117 | |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | if ($this->_rsm->isMixed && isset($this->_rootAliases[$parent])) { |
121 | 121 | $first = reset($this->_resultPointers); |
122 | 122 | // TODO: Exception if $key === null ? |
123 | - $baseElement =& $this->_resultPointers[$parent][key($first)]; |
|
123 | + $baseElement = & $this->_resultPointers[$parent][key($first)]; |
|
124 | 124 | } else if (isset($this->_resultPointers[$parent])) { |
125 | - $baseElement =& $this->_resultPointers[$parent]; |
|
125 | + $baseElement = & $this->_resultPointers[$parent]; |
|
126 | 126 | } else { |
127 | 127 | unset($this->_resultPointers[$dqlAlias]); // Ticket #1228 |
128 | 128 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | } |
174 | 174 | } |
175 | 175 | |
176 | - $coll =& $baseElement[$relationAlias]; |
|
176 | + $coll = & $baseElement[$relationAlias]; |
|
177 | 177 | |
178 | 178 | if (is_array($coll)) { |
179 | 179 | $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; |
186 | 186 | |
187 | 187 | // if this row has a NULL value for the root result id then make it a null result. |
188 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
188 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
189 | 189 | $result[] = $this->_rsm->isMixed |
190 | 190 | ? [$entityKey => null] |
191 | 191 | : null; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $resultKey = $this->_resultCounter - 1; |
247 | 247 | } |
248 | 248 | |
249 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
249 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
250 | 250 | |
251 | 251 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
252 | 252 | $class = $newObject['class']; |
@@ -284,13 +284,13 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | if ($oneToOne) { |
287 | - $this->_resultPointers[$dqlAlias] =& $coll; |
|
287 | + $this->_resultPointers[$dqlAlias] = & $coll; |
|
288 | 288 | |
289 | 289 | return; |
290 | 290 | } |
291 | 291 | |
292 | 292 | if ($index !== false) { |
293 | - $this->_resultPointers[$dqlAlias] =& $coll[$index]; |
|
293 | + $this->_resultPointers[$dqlAlias] = & $coll[$index]; |
|
294 | 294 | |
295 | 295 | return; |
296 | 296 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | } |
301 | 301 | |
302 | 302 | end($coll); |
303 | - $this->_resultPointers[$dqlAlias] =& $coll[key($coll)]; |
|
303 | + $this->_resultPointers[$dqlAlias] = & $coll[key($coll)]; |
|
304 | 304 | |
305 | 305 | return; |
306 | 306 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required."; |
285 | 285 | |
286 | 286 | if ( ! empty($hint)) { |
287 | - $message .= ' (Hint: ' . $hint . ')'; |
|
287 | + $message .= ' (Hint: '.$hint.')'; |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | return new self($message); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | */ |
315 | 315 | public static function reflectionFailure($entity, \ReflectionException $previousException) |
316 | 316 | { |
317 | - return new self('An error occurred in ' . $entity, 0, $previousException); |
|
317 | + return new self('An error occurred in '.$entity, 0, $previousException); |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public static function joinColumnMustPointToMappedField($className, $joinColumn) |
327 | 327 | { |
328 | - return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' |
|
329 | - . $className . ' since it is referenced by a join column of another class.'); |
|
328 | + return new self('The column '.$joinColumn.' must be mapped to a field in class ' |
|
329 | + . $className.' since it is referenced by a join column of another class.'); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | /** |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | */ |
432 | 432 | public static function noIdDefined($entity) |
433 | 433 | { |
434 | - return new self('No ID defined for entity ' . $entity); |
|
434 | + return new self('No ID defined for entity '.$entity); |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | /** |
@@ -456,12 +456,12 @@ discard block |
||
456 | 456 | public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) |
457 | 457 | { |
458 | 458 | if ( ! empty($path)) { |
459 | - $path = '[' . $path . ']'; |
|
459 | + $path = '['.$path.']'; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | return new self( |
463 | - 'File mapping drivers must have a valid directory path, ' . |
|
464 | - 'however the given path ' . $path . ' seems to be incorrect!' |
|
463 | + 'File mapping drivers must have a valid directory path, '. |
|
464 | + 'however the given path '.$path.' seems to be incorrect!' |
|
465 | 465 | ); |
466 | 466 | } |
467 | 467 | |
@@ -492,11 +492,11 @@ discard block |
||
492 | 492 | public static function duplicateDiscriminatorEntry($className, array $entries, array $map) |
493 | 493 | { |
494 | 494 | return new self( |
495 | - "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " . |
|
496 | - "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " . |
|
497 | - "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map( |
|
495 | + "The entries ".implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ". |
|
496 | + "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ". |
|
497 | + "The entries of the current map are: @DiscriminatorMap({".implode(', ', array_map( |
|
498 | 498 | function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map) |
499 | - )) . "})" |
|
499 | + ))."})" |
|
500 | 500 | ); |
501 | 501 | } |
502 | 502 | |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | public static function illegalOrphanRemoval($className, $field) |
644 | 644 | { |
645 | 645 | return new self("Orphan removal is only allowed on one-to-one and one-to-many ". |
646 | - "associations, but " . $className."#" .$field . " is not."); |
|
646 | + "associations, but ".$className."#".$field." is not."); |
|
647 | 647 | } |
648 | 648 | |
649 | 649 | /** |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | */ |
676 | 676 | public static function noInheritanceOnMappedSuperClass($className) |
677 | 677 | { |
678 | - return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); |
|
678 | + return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'."); |
|
679 | 679 | } |
680 | 680 | |
681 | 681 | /** |
@@ -687,8 +687,8 @@ discard block |
||
687 | 687 | public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) |
688 | 688 | { |
689 | 689 | return new self( |
690 | - "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . |
|
691 | - "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " . |
|
690 | + "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ". |
|
691 | + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ". |
|
692 | 692 | "to avoid this exception from occurring." |
693 | 693 | ); |
694 | 694 | } |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | */ |
702 | 702 | public static function lifecycleCallbackMethodNotFound($className, $methodName) |
703 | 703 | { |
704 | - return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback."); |
|
704 | + return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback."); |
|
705 | 705 | } |
706 | 706 | |
707 | 707 | /** |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | */ |
748 | 748 | public static function invalidFetchMode($className, $annotation) |
749 | 749 | { |
750 | - return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); |
|
750 | + return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'"); |
|
751 | 751 | } |
752 | 752 | |
753 | 753 | /** |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | */ |
758 | 758 | public static function compositeKeyAssignedIdGeneratorRequired($className) |
759 | 759 | { |
760 | - return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
760 | + return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
761 | 761 | } |
762 | 762 | |
763 | 763 | /** |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | */ |
770 | 770 | public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) |
771 | 771 | { |
772 | - return new self("The target-entity " . $targetEntity . " cannot be found in '" . $sourceEntity."#".$associationName."'."); |
|
772 | + return new self("The target-entity ".$targetEntity." cannot be found in '".$sourceEntity."#".$associationName."'."); |
|
773 | 773 | } |
774 | 774 | |
775 | 775 | /** |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | */ |
782 | 782 | public static function invalidCascadeOption(array $cascades, $className, $propertyName) |
783 | 783 | { |
784 | - $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades)); |
|
784 | + $cascades = implode(", ", array_map(function($e) { return "'".$e."'"; }, $cascades)); |
|
785 | 785 | |
786 | 786 | return new self(sprintf( |
787 | 787 | "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'", |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | { |
814 | 814 | return new self( |
815 | 815 | sprintf( |
816 | - 'Infinite nesting detected for embedded property %s::%s. ' . |
|
816 | + 'Infinite nesting detected for embedded property %s::%s. '. |
|
817 | 817 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
818 | 818 | $className, |
819 | 819 | $propertyName |