@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | */ |
119 | 119 | private $joinRootAliases = []; |
120 | 120 | |
121 | - /** |
|
122 | - * Whether to use second level cache, if available. |
|
123 | - * |
|
124 | - * @var boolean |
|
125 | - */ |
|
121 | + /** |
|
122 | + * Whether to use second level cache, if available. |
|
123 | + * |
|
124 | + * @var boolean |
|
125 | + */ |
|
126 | 126 | protected $cacheable = false; |
127 | 127 | |
128 | 128 | /** |
@@ -213,10 +213,10 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
216 | - * Obtain the name of the second level query cache region in which query results will be stored |
|
217 | - * |
|
218 | - * @return string|null The cache region name; NULL indicates the default region. |
|
219 | - */ |
|
216 | + * Obtain the name of the second level query cache region in which query results will be stored |
|
217 | + * |
|
218 | + * @return string|null The cache region name; NULL indicates the default region. |
|
219 | + */ |
|
220 | 220 | public function getCacheRegion() |
221 | 221 | { |
222 | 222 | return $this->cacheRegion; |
@@ -1373,10 +1373,10 @@ discard block |
||
1373 | 1373 | */ |
1374 | 1374 | private function _getDQLForDelete() |
1375 | 1375 | { |
1376 | - return 'DELETE' |
|
1377 | - . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1378 | - . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1379 | - . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1376 | + return 'DELETE' |
|
1377 | + . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1378 | + . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1379 | + . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1380 | 1380 | } |
1381 | 1381 | |
1382 | 1382 | /** |
@@ -1384,11 +1384,11 @@ discard block |
||
1384 | 1384 | */ |
1385 | 1385 | private function _getDQLForUpdate() |
1386 | 1386 | { |
1387 | - return 'UPDATE' |
|
1388 | - . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1389 | - . $this->_getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', ']) |
|
1390 | - . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1391 | - . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1387 | + return 'UPDATE' |
|
1388 | + . $this->_getReducedDQLQueryPart('from', ['pre' => ' ', 'separator' => ', ']) |
|
1389 | + . $this->_getReducedDQLQueryPart('set', ['pre' => ' SET ', 'separator' => ', ']) |
|
1390 | + . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1391 | + . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1392 | 1392 | } |
1393 | 1393 | |
1394 | 1394 | /** |
@@ -1397,8 +1397,8 @@ discard block |
||
1397 | 1397 | private function _getDQLForSelect() |
1398 | 1398 | { |
1399 | 1399 | $dql = 'SELECT' |
1400 | - . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '') |
|
1401 | - . $this->_getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); |
|
1400 | + . ($this->_dqlParts['distinct']===true ? ' DISTINCT' : '') |
|
1401 | + . $this->_getReducedDQLQueryPart('select', ['pre' => ' ', 'separator' => ', ']); |
|
1402 | 1402 | |
1403 | 1403 | $fromParts = $this->getDQLPart('from'); |
1404 | 1404 | $joinParts = $this->getDQLPart('join'); |
@@ -1422,10 +1422,10 @@ discard block |
||
1422 | 1422 | } |
1423 | 1423 | |
1424 | 1424 | $dql .= implode(', ', $fromClauses) |
1425 | - . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1426 | - . $this->_getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', ']) |
|
1427 | - . $this->_getReducedDQLQueryPart('having', ['pre' => ' HAVING ']) |
|
1428 | - . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1425 | + . $this->_getReducedDQLQueryPart('where', ['pre' => ' WHERE ']) |
|
1426 | + . $this->_getReducedDQLQueryPart('groupBy', ['pre' => ' GROUP BY ', 'separator' => ', ']) |
|
1427 | + . $this->_getReducedDQLQueryPart('having', ['pre' => ' HAVING ']) |
|
1428 | + . $this->_getReducedDQLQueryPart('orderBy', ['pre' => ' ORDER BY ', 'separator' => ', ']); |
|
1429 | 1429 | |
1430 | 1430 | return $dql; |
1431 | 1431 | } |
@@ -1445,8 +1445,8 @@ discard block |
||
1445 | 1445 | } |
1446 | 1446 | |
1447 | 1447 | return ($options['pre'] ?? '') |
1448 | - . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart) |
|
1449 | - . ($options['post'] ?? ''); |
|
1448 | + . (is_array($queryPart) ? implode($options['separator'], $queryPart) : $queryPart) |
|
1449 | + . ($options['post'] ?? ''); |
|
1450 | 1450 | } |
1451 | 1451 | |
1452 | 1452 | /** |
@@ -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 | /** |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | public function validateAssociations() |
1026 | 1026 | { |
1027 | 1027 | foreach ($this->associationMappings as $mapping) { |
1028 | - if ( ! ClassLoader::classExists($mapping['targetEntity']) ) { |
|
1028 | + if ( ! ClassLoader::classExists($mapping['targetEntity'])) { |
|
1029 | 1029 | throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); |
1030 | 1030 | } |
1031 | 1031 | } |
@@ -1103,7 +1103,7 @@ discard block |
||
1103 | 1103 | } |
1104 | 1104 | |
1105 | 1105 | if ( ! isset($cache['region'])) { |
1106 | - $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)) . '__' . $fieldName; |
|
1106 | + $cache['region'] = strtolower(str_replace('\\', '_', $this->rootEntityName)).'__'.$fieldName; |
|
1107 | 1107 | } |
1108 | 1108 | |
1109 | 1109 | return $cache; |
@@ -1383,7 +1383,7 @@ discard block |
||
1383 | 1383 | protected function _validateAndCompleteFieldMapping(array &$mapping) |
1384 | 1384 | { |
1385 | 1385 | // Check mandatory fields |
1386 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1386 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1387 | 1387 | throw MappingException::missingFieldName($this->name); |
1388 | 1388 | } |
1389 | 1389 | |
@@ -1496,14 +1496,14 @@ discard block |
||
1496 | 1496 | $this->isIdentifierComposite = true; |
1497 | 1497 | } |
1498 | 1498 | |
1499 | - if ($this->cache && !isset($mapping['cache'])) { |
|
1499 | + if ($this->cache && ! isset($mapping['cache'])) { |
|
1500 | 1500 | throw CacheException::nonCacheableEntityAssociation($this->name, $mapping['fieldName']); |
1501 | 1501 | } |
1502 | 1502 | } |
1503 | 1503 | |
1504 | 1504 | // Mandatory attributes for both sides |
1505 | 1505 | // Mandatory: fieldName, targetEntity |
1506 | - if ( ! isset($mapping['fieldName']) || !$mapping['fieldName']) { |
|
1506 | + if ( ! isset($mapping['fieldName']) || ! $mapping['fieldName']) { |
|
1507 | 1507 | throw MappingException::missingFieldName($this->name); |
1508 | 1508 | } |
1509 | 1509 | |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | throw new RuntimeException("ClassMetadataInfo::setTable() has to be called before defining a one to one relationship."); |
1626 | 1626 | } |
1627 | 1627 | |
1628 | - $this->table['uniqueConstraints'][$mapping['fieldName'] . "_uniq"] = [ |
|
1628 | + $this->table['uniqueConstraints'][$mapping['fieldName']."_uniq"] = [ |
|
1629 | 1629 | 'columns' => $uniqueConstraintColumns |
1630 | 1630 | ]; |
1631 | 1631 | } |
@@ -1640,7 +1640,7 @@ discard block |
||
1640 | 1640 | unset($mapping['unique']); |
1641 | 1641 | } |
1642 | 1642 | |
1643 | - if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
|
1643 | + if (isset($mapping['id']) && $mapping['id'] === true && ! $mapping['isOwningSide']) { |
|
1644 | 1644 | throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
1645 | 1645 | } |
1646 | 1646 | |
@@ -1694,7 +1694,7 @@ discard block |
||
1694 | 1694 | } |
1695 | 1695 | |
1696 | 1696 | $selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
1697 | - && (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1697 | + && ( ! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
|
1698 | 1698 | |
1699 | 1699 | if ( ! isset($mapping['joinTable']['joinColumns'])) { |
1700 | 1700 | $mapping['joinTable']['joinColumns'] = [ |
@@ -1887,7 +1887,7 @@ discard block |
||
1887 | 1887 | |
1888 | 1888 | // Association defined as Id field |
1889 | 1889 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
1890 | - $assocColumnNames = array_map(function ($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1890 | + $assocColumnNames = array_map(function($joinColumn) { return $joinColumn['name']; }, $joinColumns); |
|
1891 | 1891 | |
1892 | 1892 | $columnNames = array_merge($columnNames, $assocColumnNames); |
1893 | 1893 | } |
@@ -2068,7 +2068,7 @@ discard block |
||
2068 | 2068 | public function getTemporaryIdTableName() |
2069 | 2069 | { |
2070 | 2070 | // replace dots with underscores because PostgreSQL creates temporary tables in a special schema |
2071 | - return str_replace('.', '_', $this->getTableName() . '_id_tmp'); |
|
2071 | + return str_replace('.', '_', $this->getTableName().'_id_tmp'); |
|
2072 | 2072 | } |
2073 | 2073 | |
2074 | 2074 | /** |
@@ -2405,7 +2405,7 @@ discard block |
||
2405 | 2405 | */ |
2406 | 2406 | public function addNamedQuery(array $queryMapping) |
2407 | 2407 | { |
2408 | - if (!isset($queryMapping['name'])) { |
|
2408 | + if ( ! isset($queryMapping['name'])) { |
|
2409 | 2409 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2410 | 2410 | } |
2411 | 2411 | |
@@ -2413,7 +2413,7 @@ discard block |
||
2413 | 2413 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2414 | 2414 | } |
2415 | 2415 | |
2416 | - if (!isset($queryMapping['query'])) { |
|
2416 | + if ( ! isset($queryMapping['query'])) { |
|
2417 | 2417 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2418 | 2418 | } |
2419 | 2419 | |
@@ -2440,7 +2440,7 @@ discard block |
||
2440 | 2440 | */ |
2441 | 2441 | public function addNamedNativeQuery(array $queryMapping) |
2442 | 2442 | { |
2443 | - if (!isset($queryMapping['name'])) { |
|
2443 | + if ( ! isset($queryMapping['name'])) { |
|
2444 | 2444 | throw MappingException::nameIsMandatoryForQueryMapping($this->name); |
2445 | 2445 | } |
2446 | 2446 | |
@@ -2448,11 +2448,11 @@ discard block |
||
2448 | 2448 | throw MappingException::duplicateQueryMapping($this->name, $queryMapping['name']); |
2449 | 2449 | } |
2450 | 2450 | |
2451 | - if (!isset($queryMapping['query'])) { |
|
2451 | + if ( ! isset($queryMapping['query'])) { |
|
2452 | 2452 | throw MappingException::emptyQueryMapping($this->name, $queryMapping['name']); |
2453 | 2453 | } |
2454 | 2454 | |
2455 | - if (!isset($queryMapping['resultClass']) && !isset($queryMapping['resultSetMapping'])) { |
|
2455 | + if ( ! isset($queryMapping['resultClass']) && ! isset($queryMapping['resultSetMapping'])) { |
|
2456 | 2456 | throw MappingException::missingQueryMapping($this->name, $queryMapping['name']); |
2457 | 2457 | } |
2458 | 2458 | |
@@ -2484,7 +2484,7 @@ discard block |
||
2484 | 2484 | */ |
2485 | 2485 | public function addSqlResultSetMapping(array $resultMapping) |
2486 | 2486 | { |
2487 | - if (!isset($resultMapping['name'])) { |
|
2487 | + if ( ! isset($resultMapping['name'])) { |
|
2488 | 2488 | throw MappingException::nameIsMandatoryForSqlResultSetMapping($this->name); |
2489 | 2489 | } |
2490 | 2490 | |
@@ -2494,7 +2494,7 @@ discard block |
||
2494 | 2494 | |
2495 | 2495 | if (isset($resultMapping['entities'])) { |
2496 | 2496 | foreach ($resultMapping['entities'] as $key => $entityResult) { |
2497 | - if (!isset($entityResult['entityClass'])) { |
|
2497 | + if ( ! isset($entityResult['entityClass'])) { |
|
2498 | 2498 | throw MappingException::missingResultSetMappingEntity($this->name, $resultMapping['name']); |
2499 | 2499 | } |
2500 | 2500 | |
@@ -2513,11 +2513,11 @@ discard block |
||
2513 | 2513 | |
2514 | 2514 | if (isset($entityResult['fields'])) { |
2515 | 2515 | foreach ($entityResult['fields'] as $k => $field) { |
2516 | - if (!isset($field['name'])) { |
|
2516 | + if ( ! isset($field['name'])) { |
|
2517 | 2517 | throw MappingException::missingResultSetMappingFieldName($this->name, $resultMapping['name']); |
2518 | 2518 | } |
2519 | 2519 | |
2520 | - if (!isset($field['column'])) { |
|
2520 | + if ( ! isset($field['column'])) { |
|
2521 | 2521 | $fieldName = $field['name']; |
2522 | 2522 | if (strpos($fieldName, '.')) { |
2523 | 2523 | list(, $fieldName) = explode('.', $fieldName); |
@@ -3008,7 +3008,7 @@ discard block |
||
3008 | 3008 | } |
3009 | 3009 | |
3010 | 3010 | if ($definition['sequenceName'][0] == '`') { |
3011 | - $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3011 | + $definition['sequenceName'] = trim($definition['sequenceName'], '`'); |
|
3012 | 3012 | $definition['quoted'] = true; |
3013 | 3013 | } |
3014 | 3014 | |
@@ -3100,7 +3100,7 @@ discard block |
||
3100 | 3100 | public function getAssociationTargetClass($assocName) |
3101 | 3101 | { |
3102 | 3102 | if ( ! isset($this->associationMappings[$assocName])) { |
3103 | - throw new InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); |
|
3103 | + throw new InvalidArgumentException("Association name expected, '".$assocName."' is not an association."); |
|
3104 | 3104 | } |
3105 | 3105 | |
3106 | 3106 | return $this->associationMappings[$assocName]['targetEntity']; |
@@ -3139,7 +3139,7 @@ discard block |
||
3139 | 3139 | // Association defined as Id field |
3140 | 3140 | $joinColumns = $this->associationMappings[$idProperty]['joinColumns']; |
3141 | 3141 | $assocQuotedColumnNames = array_map( |
3142 | - function ($joinColumn) use ($platform) { |
|
3142 | + function($joinColumn) use ($platform) { |
|
3143 | 3143 | return isset($joinColumn['quoted']) |
3144 | 3144 | ? $platform->quoteIdentifier($joinColumn['name']) |
3145 | 3145 | : $joinColumn['name']; |
@@ -3250,7 +3250,7 @@ discard block |
||
3250 | 3250 | } |
3251 | 3251 | |
3252 | 3252 | if ($className !== null && strpos($className, '\\') === false && $this->namespace) { |
3253 | - return $this->namespace . '\\' . $className; |
|
3253 | + return $this->namespace.'\\'.$className; |
|
3254 | 3254 | } |
3255 | 3255 | |
3256 | 3256 | return $className; |
@@ -3302,13 +3302,13 @@ discard block |
||
3302 | 3302 | foreach ($embeddable->fieldMappings as $fieldMapping) { |
3303 | 3303 | $fieldMapping['originalClass'] = $fieldMapping['originalClass'] ?? $embeddable->name; |
3304 | 3304 | $fieldMapping['declaredField'] = isset($fieldMapping['declaredField']) |
3305 | - ? $property . '.' . $fieldMapping['declaredField'] |
|
3305 | + ? $property.'.'.$fieldMapping['declaredField'] |
|
3306 | 3306 | : $property; |
3307 | 3307 | $fieldMapping['originalField'] = $fieldMapping['originalField'] ?? $fieldMapping['fieldName']; |
3308 | - $fieldMapping['fieldName'] = $property . "." . $fieldMapping['fieldName']; |
|
3308 | + $fieldMapping['fieldName'] = $property.".".$fieldMapping['fieldName']; |
|
3309 | 3309 | |
3310 | - if (! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3311 | - $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'] . $fieldMapping['columnName']; |
|
3310 | + if ( ! empty($this->embeddedClasses[$property]['columnPrefix'])) { |
|
3311 | + $fieldMapping['columnName'] = $this->embeddedClasses[$property]['columnPrefix'].$fieldMapping['columnName']; |
|
3312 | 3312 | } elseif ($this->embeddedClasses[$property]['columnPrefix'] !== false) { |
3313 | 3313 | $fieldMapping['columnName'] = $this->namingStrategy |
3314 | 3314 | ->embeddedFieldToColumnName( |
@@ -3349,7 +3349,7 @@ discard block |
||
3349 | 3349 | { |
3350 | 3350 | $sequencePrefix = $this->getSequencePrefix($platform); |
3351 | 3351 | $columnName = $this->getSingleIdentifierColumnName(); |
3352 | - $sequenceName = $sequencePrefix . '_' . $columnName . '_seq'; |
|
3352 | + $sequenceName = $sequencePrefix.'_'.$columnName.'_seq'; |
|
3353 | 3353 | |
3354 | 3354 | return $sequenceName; |
3355 | 3355 | } |
@@ -3369,10 +3369,10 @@ discard block |
||
3369 | 3369 | |
3370 | 3370 | // Prepend the schema name to the table name if there is one |
3371 | 3371 | if ($schemaName = $this->getSchemaName()) { |
3372 | - $sequencePrefix = $schemaName . '.' . $tableName; |
|
3372 | + $sequencePrefix = $schemaName.'.'.$tableName; |
|
3373 | 3373 | |
3374 | 3374 | if ( ! $platform->supportsSchemas() && $platform->canEmulateSchemas()) { |
3375 | - $sequencePrefix = $schemaName . '__' . $tableName; |
|
3375 | + $sequencePrefix = $schemaName.'__'.$tableName; |
|
3376 | 3376 | } |
3377 | 3377 | } |
3378 | 3378 | |
@@ -3384,8 +3384,8 @@ discard block |
||
3384 | 3384 | */ |
3385 | 3385 | private function assertMappingOrderBy(array $mapping) |
3386 | 3386 | { |
3387 | - if (isset($mapping['orderBy']) && !is_array($mapping['orderBy'])) { |
|
3388 | - throw new InvalidArgumentException("'orderBy' is expected to be an array, not " . gettype($mapping['orderBy'])); |
|
3387 | + if (isset($mapping['orderBy']) && ! is_array($mapping['orderBy'])) { |
|
3388 | + throw new InvalidArgumentException("'orderBy' is expected to be an array, not ".gettype($mapping['orderBy'])); |
|
3389 | 3389 | } |
3390 | 3390 | } |
3391 | 3391 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | switch ($mode) { |
205 | 205 | case self::COLUMN_RENAMING_INCREMENT: |
206 | - return $columnName . $this->sqlCounter++; |
|
206 | + return $columnName.$this->sqlCounter++; |
|
207 | 207 | |
208 | 208 | case self::COLUMN_RENAMING_CUSTOM: |
209 | 209 | return $customRenameColumns[$columnName] ?? $columnName; |
@@ -325,19 +325,19 @@ discard block |
||
325 | 325 | $counter = 0; |
326 | 326 | $resultMapping = $class->getSqlResultSetMapping($resultSetMappingName); |
327 | 327 | $rootShortName = $class->reflClass->getShortName(); |
328 | - $rootAlias = strtolower($rootShortName[0]) . $counter; |
|
328 | + $rootAlias = strtolower($rootShortName[0]).$counter; |
|
329 | 329 | |
330 | 330 | |
331 | 331 | if (isset($resultMapping['entities'])) { |
332 | 332 | foreach ($resultMapping['entities'] as $key => $entityMapping) { |
333 | - $classMetadata = $this->em->getClassMetadata($entityMapping['entityClass']); |
|
333 | + $classMetadata = $this->em->getClassMetadata($entityMapping['entityClass']); |
|
334 | 334 | |
335 | 335 | if ($class->reflClass->name == $classMetadata->reflClass->name) { |
336 | 336 | $this->addEntityResult($classMetadata->name, $rootAlias); |
337 | 337 | $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $rootAlias); |
338 | 338 | } else { |
339 | 339 | $shortName = $classMetadata->reflClass->getShortName(); |
340 | - $joinAlias = strtolower($shortName[0]) . ++ $counter; |
|
340 | + $joinAlias = strtolower($shortName[0]).++ $counter; |
|
341 | 341 | $associations = $class->getAssociationsByTargetClass($classMetadata->name); |
342 | 342 | |
343 | 343 | $this->addNamedNativeQueryEntityResultMapping($classMetadata, $entityMapping, $joinAlias); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | $this->addMetaResult($alias, $discriminatorColumn, $discriminatorColumn, false, $discriminatorType); |
386 | 386 | } |
387 | 387 | |
388 | - if (isset($entityMapping['fields']) && !empty($entityMapping['fields'])) { |
|
388 | + if (isset($entityMapping['fields']) && ! empty($entityMapping['fields'])) { |
|
389 | 389 | foreach ($entityMapping['fields'] as $field) { |
390 | 390 | $fieldName = $field['name']; |
391 | 391 | $relation = null; |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | $sql .= ", "; |
447 | 447 | } |
448 | 448 | |
449 | - $sql .= $tableAlias . "."; |
|
449 | + $sql .= $tableAlias."."; |
|
450 | 450 | |
451 | 451 | if (isset($this->fieldMappings[$columnName])) { |
452 | 452 | $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]); |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | $sql .= $this->discriminatorColumns[$dqlAlias]; |
458 | 458 | } |
459 | 459 | |
460 | - $sql .= " AS " . $columnName; |
|
460 | + $sql .= " AS ".$columnName; |
|
461 | 461 | } |
462 | 462 | |
463 | 463 | return $sql; |