@@ -22,13 +22,10 @@ |
||
| 22 | 22 | use Doctrine\Common\Util\ClassUtils; |
| 23 | 23 | use Doctrine\Common\Collections\Collection; |
| 24 | 24 | use Doctrine\Common\Collections\ArrayCollection; |
| 25 | - |
|
| 26 | 25 | use Doctrine\ORM\Query\Parameter; |
| 27 | 26 | use Doctrine\ORM\Cache\QueryCacheKey; |
| 28 | 27 | use Doctrine\DBAL\Cache\QueryCacheProfile; |
| 29 | - |
|
| 30 | 28 | use Doctrine\ORM\Cache; |
| 31 | -use Doctrine\ORM\Query\QueryException; |
|
| 32 | 29 | |
| 33 | 30 | /** |
| 34 | 31 | * Base contract for ORM queries. Base class for Query and NativeQuery. |
@@ -212,10 +212,10 @@ |
||
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | - * Obtain the name of the second level query cache region in which query results will be stored |
|
| 216 | - * |
|
| 217 | - * @return string|null The cache region name; NULL indicates the default region. |
|
| 218 | - */ |
|
| 215 | + * Obtain the name of the second level query cache region in which query results will be stored |
|
| 216 | + * |
|
| 217 | + * @return string|null The cache region name; NULL indicates the default region. |
|
| 218 | + */ |
|
| 219 | 219 | public function getCacheRegion() |
| 220 | 220 | { |
| 221 | 221 | return $this->cacheRegion; |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | public function getParameter($key) |
| 325 | 325 | { |
| 326 | 326 | $filteredParameters = $this->parameters->filter( |
| 327 | - function ($parameter) use ($key) |
|
| 327 | + function($parameter) use ($key) |
|
| 328 | 328 | { |
| 329 | 329 | // Must not be identical because of string to integer conversion |
| 330 | 330 | return ($key == $parameter->getName()); |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | public function setParameter($key, $value, $type = null) |
| 374 | 374 | { |
| 375 | 375 | $filteredParameters = $this->parameters->filter( |
| 376 | - function ($parameter) use ($key) |
|
| 376 | + function($parameter) use ($key) |
|
| 377 | 377 | { |
| 378 | 378 | // Must not be identical because of string to integer conversion |
| 379 | 379 | return ($key == $parameter->getName()); |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | */ |
| 470 | 470 | private function translateNamespaces(Query\ResultSetMapping $rsm) |
| 471 | 471 | { |
| 472 | - $translate = function ($alias) { |
|
| 472 | + $translate = function($alias) { |
|
| 473 | 473 | return $this->_em->getClassMetadata($alias)->getName(); |
| 474 | 474 | }; |
| 475 | 475 | |
@@ -1114,6 +1114,6 @@ discard block |
||
| 1114 | 1114 | |
| 1115 | 1115 | ksort($hints); |
| 1116 | 1116 | |
| 1117 | - return sha1($query . '-' . serialize($params) . '-' . serialize($hints)); |
|
| 1117 | + return sha1($query.'-'.serialize($params).'-'.serialize($hints)); |
|
| 1118 | 1118 | } |
| 1119 | 1119 | } |
@@ -282,7 +282,7 @@ |
||
| 282 | 282 | /** |
| 283 | 283 | * Generates a string of currently query |
| 284 | 284 | * |
| 285 | - * @param array $query |
|
| 285 | + * @param string $query |
|
| 286 | 286 | * @param string $criteria |
| 287 | 287 | * @param array $orderBy |
| 288 | 288 | * @param integer $limit |
@@ -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 | /** |
@@ -297,7 +297,7 @@ |
||
| 297 | 297 | ? $this->persister->expandCriteriaParameters($criteria) |
| 298 | 298 | : $this->persister->expandParameters($criteria); |
| 299 | 299 | |
| 300 | - return sha1($query . serialize($params) . serialize($orderBy) . $limit . $offset . $timestamp); |
|
| 300 | + return sha1($query.serialize($params).serialize($orderBy).$limit.$offset.$timestamp); |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /** |
@@ -21,7 +21,6 @@ |
||
| 21 | 21 | |
| 22 | 22 | use Doctrine\Common\Collections\ArrayCollection; |
| 23 | 23 | use Doctrine\Common\Collections\Criteria; |
| 24 | - |
|
| 25 | 24 | use Doctrine\ORM\Query\Expr; |
| 26 | 25 | use Doctrine\ORM\Query\QueryExpressionVisitor; |
| 27 | 26 | |
@@ -24,9 +24,6 @@ |
||
| 24 | 24 | use Doctrine\ORM\Mapping\ClassMetadata; |
| 25 | 25 | use Doctrine\ORM\PersistentCollection; |
| 26 | 26 | use Doctrine\ORM\Query; |
| 27 | -use Doctrine\ORM\Events; |
|
| 28 | -use Doctrine\ORM\Event\LifecycleEventArgs; |
|
| 29 | -use Doctrine\ORM\Event\PostLoadEventDispatcher; |
|
| 30 | 27 | use Doctrine\Common\Collections\ArrayCollection; |
| 31 | 28 | use Doctrine\ORM\Proxy\Proxy; |
| 32 | 29 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $class->reflFields[$fieldName]->setValue($entity, $value); |
| 203 | 203 | $this->_uow->setOriginalEntityProperty($oid, $fieldName, $value); |
| 204 | 204 | |
| 205 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 205 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 206 | 206 | } else if ( |
| 207 | 207 | isset($this->_hints[Query::HINT_REFRESH]) || |
| 208 | 208 | isset($this->_hints['fetched'][$parentDqlAlias][$fieldName]) && |
@@ -213,10 +213,10 @@ discard block |
||
| 213 | 213 | $value->setInitialized(true); |
| 214 | 214 | $value->unwrap()->clear(); |
| 215 | 215 | |
| 216 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
| 216 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
| 217 | 217 | } else { |
| 218 | 218 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
| 219 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
| 219 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | return $value; |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $idHash = ''; |
| 290 | 290 | |
| 291 | 291 | foreach ($class->identifier as $fieldName) { |
| 292 | - $idHash .= ' ' . (isset($class->associationMappings[$fieldName]) |
|
| 292 | + $idHash .= ' '.(isset($class->associationMappings[$fieldName]) |
|
| 293 | 293 | ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']] |
| 294 | 294 | : $data[$fieldName]); |
| 295 | 295 | } |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | $parentAlias = $this->_rsm->parentAliasMap[$dqlAlias]; |
| 343 | 343 | // we need the $path to save into the identifier map which entities were already |
| 344 | 344 | // seen for this parent-child relationship |
| 345 | - $path = $parentAlias . '.' . $dqlAlias; |
|
| 345 | + $path = $parentAlias.'.'.$dqlAlias; |
|
| 346 | 346 | |
| 347 | 347 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
| 348 | 348 | if ( ! isset($nonemptyComponents[$parentAlias])) { |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | $reflFieldValue = $reflField->getValue($parentObject); |
| 383 | 383 | |
| 384 | 384 | if (isset($nonemptyComponents[$dqlAlias])) { |
| 385 | - $collKey = $oid . $relationField; |
|
| 385 | + $collKey = $oid.$relationField; |
|
| 386 | 386 | if (isset($this->initializedCollections[$collKey])) { |
| 387 | 387 | $reflFieldValue = $this->initializedCollections[$collKey]; |
| 388 | 388 | } else if ( ! isset($this->existingCollections[$collKey])) { |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | // PATH B: Single-valued association |
| 431 | 431 | $reflFieldValue = $reflField->getValue($parentObject); |
| 432 | 432 | |
| 433 | - if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && !$reflFieldValue->__isInitialized__)) { |
|
| 433 | + if ( ! $reflFieldValue || isset($this->_hints[Query::HINT_REFRESH]) || ($reflFieldValue instanceof Proxy && ! $reflFieldValue->__isInitialized__)) { |
|
| 434 | 434 | // we only need to take action if this value is null, |
| 435 | 435 | // we refresh the entity or its an unitialized proxy. |
| 436 | 436 | if (isset($nonemptyComponents[$dqlAlias])) { |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; |
| 476 | 476 | |
| 477 | 477 | // if this row has a NULL value for the root result id then make it a null result. |
| 478 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
| 478 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
| 479 | 479 | if ($this->_rsm->isMixed) { |
| 480 | 480 | $result[] = array($entityKey => null); |
| 481 | 481 | } else { |
@@ -531,13 +531,13 @@ discard block |
||
| 531 | 531 | } |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | - if ( ! isset($resultKey) ) { |
|
| 534 | + if ( ! isset($resultKey)) { |
|
| 535 | 535 | $this->resultCounter++; |
| 536 | 536 | } |
| 537 | 537 | |
| 538 | 538 | // Append scalar values to mixed result sets |
| 539 | 539 | if (isset($rowData['scalars'])) { |
| 540 | - if ( ! isset($resultKey) ) { |
|
| 540 | + if ( ! isset($resultKey)) { |
|
| 541 | 541 | $resultKey = (isset($this->_rsm->indexByMap['scalars'])) |
| 542 | 542 | ? $row[$this->_rsm->indexByMap['scalars']] |
| 543 | 543 | : $this->resultCounter - 1; |
@@ -550,19 +550,19 @@ discard block |
||
| 550 | 550 | |
| 551 | 551 | // Append new object to mixed result sets |
| 552 | 552 | if (isset($rowData['newObjects'])) { |
| 553 | - if ( ! isset($resultKey) ) { |
|
| 553 | + if ( ! isset($resultKey)) { |
|
| 554 | 554 | $resultKey = $this->resultCounter - 1; |
| 555 | 555 | } |
| 556 | 556 | |
| 557 | 557 | |
| 558 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
| 558 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
| 559 | 559 | |
| 560 | 560 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
| 561 | 561 | $class = $newObject['class']; |
| 562 | 562 | $args = $newObject['args']; |
| 563 | 563 | $obj = $class->newInstanceArgs($args); |
| 564 | 564 | |
| 565 | - if ($scalarCount == 0 && count($rowData['newObjects']) == 1 ) { |
|
| 565 | + if ($scalarCount == 0 && count($rowData['newObjects']) == 1) { |
|
| 566 | 566 | $result[$resultKey] = $obj; |
| 567 | 567 | |
| 568 | 568 | continue; |
@@ -70,8 +70,6 @@ |
||
| 70 | 70 | * Returns a join column name for a property. |
| 71 | 71 | * |
| 72 | 72 | * @param string $propertyName A property name. |
| 73 | - * @param string|null $className The fully-qualified class name. |
|
| 74 | - * This parameter is omitted from the signature due to BC |
|
| 75 | 73 | * |
| 76 | 74 | * @return string A join column name. |
| 77 | 75 | */ |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | /** |
| 50 | 50 | * Gets the SQL query. |
| 51 | 51 | * |
| 52 | - * @return mixed The built SQL query or an array of all SQL queries. |
|
| 52 | + * @return string The built SQL query or an array of all SQL queries. |
|
| 53 | 53 | * |
| 54 | 54 | * @override |
| 55 | 55 | */ |
@@ -579,7 +579,7 @@ |
||
| 579 | 579 | * Internal note: Tried to implement Serializable first but that did not work well |
| 580 | 580 | * with circular references. This solution seems simpler and works well. |
| 581 | 581 | * |
| 582 | - * @return array |
|
| 582 | + * @return string[] |
|
| 583 | 583 | */ |
| 584 | 584 | public function __sleep() |
| 585 | 585 | { |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | */ |
| 404 | 404 | public function containsKey($key) |
| 405 | 405 | { |
| 406 | - if (! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY |
|
| 406 | + if ( ! $this->initialized && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY |
|
| 407 | 407 | && isset($this->association['indexBy'])) { |
| 408 | 408 | $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); |
| 409 | 409 | |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | && $this->association['fetch'] === ClassMetadata::FETCH_EXTRA_LAZY |
| 437 | 437 | && isset($this->association['indexBy']) |
| 438 | 438 | ) { |
| 439 | - if (!$this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) { |
|
| 439 | + if ( ! $this->typeClass->isIdentifierComposite && $this->typeClass->isIdentifier($this->association['indexBy'])) { |
|
| 440 | 440 | return $this->em->find($this->typeClass->name, $key); |
| 441 | 441 | } |
| 442 | 442 | |
@@ -20,7 +20,6 @@ |
||
| 20 | 20 | namespace Doctrine\ORM\Persisters\Collection; |
| 21 | 21 | |
| 22 | 22 | use Doctrine\Common\Collections\Criteria; |
| 23 | -use Doctrine\Common\Proxy\Proxy; |
|
| 24 | 23 | use Doctrine\DBAL\Types\Type; |
| 25 | 24 | use Doctrine\ORM\PersistentCollection; |
| 26 | 25 | use Doctrine\ORM\Utility\PersisterHelper; |
@@ -218,8 +218,8 @@ discard block |
||
| 218 | 218 | $parameters[] = $identifier[$sourceClass->getFieldForColumn($joinColumn['referencedColumnName'])]; |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | - $statement = 'DELETE FROM ' . $this->quoteStrategy->getTableName($targetClass, $this->platform) |
|
| 222 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
| 221 | + $statement = 'DELETE FROM '.$this->quoteStrategy->getTableName($targetClass, $this->platform) |
|
| 222 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
| 223 | 223 | |
| 224 | 224 | return $this->conn->executeUpdate($statement, $parameters); |
| 225 | 225 | } |
@@ -256,18 +256,18 @@ discard block |
||
| 256 | 256 | ); |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | - $statement = $this->platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable |
|
| 260 | - . ' (' . $this->platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
| 259 | + $statement = $this->platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable |
|
| 260 | + . ' ('.$this->platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
| 261 | 261 | |
| 262 | 262 | $this->conn->executeUpdate($statement); |
| 263 | 263 | |
| 264 | 264 | // 2) Build insert table records into temporary table |
| 265 | 265 | $query = $this->em->createQuery( |
| 266 | - ' SELECT t0.' . implode(', t0.', $rootClass->getIdentifierFieldNames()) |
|
| 267 | - . ' FROM ' . $targetClass->name . ' t0 WHERE t0.' . $mapping['mappedBy'] . ' = :owner' |
|
| 266 | + ' SELECT t0.'.implode(', t0.', $rootClass->getIdentifierFieldNames()) |
|
| 267 | + . ' FROM '.$targetClass->name.' t0 WHERE t0.'.$mapping['mappedBy'].' = :owner' |
|
| 268 | 268 | )->setParameter('owner', $collection->getOwner()); |
| 269 | 269 | |
| 270 | - $statement = 'INSERT INTO ' . $tempTable . ' (' . $idColumnList . ') ' . $query->getSQL(); |
|
| 270 | + $statement = 'INSERT INTO '.$tempTable.' ('.$idColumnList.') '.$query->getSQL(); |
|
| 271 | 271 | $parameters = array_values($sourceClass->getIdentifierValues($collection->getOwner())); |
| 272 | 272 | $numDeleted = $this->conn->executeUpdate($statement, $parameters); |
| 273 | 273 | |
@@ -276,8 +276,8 @@ discard block |
||
| 276 | 276 | |
| 277 | 277 | foreach (array_reverse($classNames) as $className) { |
| 278 | 278 | $tableName = $this->quoteStrategy->getTableName($this->em->getClassMetadata($className), $this->platform); |
| 279 | - $statement = 'DELETE FROM ' . $tableName . ' WHERE (' . $idColumnList . ')' |
|
| 280 | - . ' IN (SELECT ' . $idColumnList . ' FROM ' . $tempTable . ')'; |
|
| 279 | + $statement = 'DELETE FROM '.$tableName.' WHERE ('.$idColumnList.')' |
|
| 280 | + . ' IN (SELECT '.$idColumnList.' FROM '.$tempTable.')'; |
|
| 281 | 281 | |
| 282 | 282 | $this->conn->executeUpdate($statement); |
| 283 | 283 | } |
@@ -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); |
@@ -20,11 +20,8 @@ |
||
| 20 | 20 | namespace Doctrine\ORM\Persisters\Entity; |
| 21 | 21 | |
| 22 | 22 | use Doctrine\ORM\Mapping\ClassMetadata; |
| 23 | -use Doctrine\ORM\Query\ResultSetMapping; |
|
| 24 | - |
|
| 25 | 23 | use Doctrine\DBAL\LockMode; |
| 26 | 24 | use Doctrine\DBAL\Types\Type; |
| 27 | - |
|
| 28 | 25 | use Doctrine\Common\Collections\Criteria; |
| 29 | 26 | use Doctrine\ORM\Utility\PersisterHelper; |
| 30 | 27 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | foreach ($data as $columnName => $value) { |
| 211 | - if (!is_array($id) || !isset($id[$columnName])) { |
|
| 211 | + if ( ! is_array($id) || ! isset($id[$columnName])) { |
|
| 212 | 212 | $stmt->bindValue($paramIndex++, $value, $this->columnTypes[$columnName]); |
| 213 | 213 | } |
| 214 | 214 | } |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | // If the current class in the root entity, add the filters |
| 324 | 324 | if ($filterSql = $this->generateFilterConditionSQL($this->em->getClassMetadata($this->class->rootEntityName), $this->getSQLTableAlias($this->class->rootEntityName))) { |
| 325 | 325 | $conditionSql .= $conditionSql |
| 326 | - ? ' AND ' . $filterSql |
|
| 326 | + ? ' AND '.$filterSql |
|
| 327 | 327 | : $filterSql; |
| 328 | 328 | } |
| 329 | 329 | |
@@ -342,29 +342,29 @@ discard block |
||
| 342 | 342 | switch ($lockMode) { |
| 343 | 343 | case LockMode::PESSIMISTIC_READ: |
| 344 | 344 | |
| 345 | - $lockSql = ' ' . $this->platform->getReadLockSql(); |
|
| 345 | + $lockSql = ' '.$this->platform->getReadLockSql(); |
|
| 346 | 346 | |
| 347 | 347 | break; |
| 348 | 348 | |
| 349 | 349 | case LockMode::PESSIMISTIC_WRITE: |
| 350 | 350 | |
| 351 | - $lockSql = ' ' . $this->platform->getWriteLockSql(); |
|
| 351 | + $lockSql = ' '.$this->platform->getWriteLockSql(); |
|
| 352 | 352 | |
| 353 | 353 | break; |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | $tableName = $this->quoteStrategy->getTableName($this->class, $this->platform); |
| 357 | - $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; |
|
| 358 | - $where = $conditionSql != '' ? ' WHERE ' . $conditionSql : ''; |
|
| 357 | + $from = ' FROM '.$tableName.' '.$baseTableAlias; |
|
| 358 | + $where = $conditionSql != '' ? ' WHERE '.$conditionSql : ''; |
|
| 359 | 359 | $lock = $this->platform->appendLockHint($from, $lockMode); |
| 360 | 360 | $columnList = $this->getSelectColumnsSQL(); |
| 361 | - $query = 'SELECT ' . $columnList |
|
| 361 | + $query = 'SELECT '.$columnList |
|
| 362 | 362 | . $lock |
| 363 | 363 | . $joinSql |
| 364 | 364 | . $where |
| 365 | 365 | . $orderBySql; |
| 366 | 366 | |
| 367 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
| 367 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | /** |
@@ -384,14 +384,14 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | if ('' !== $filterSql) { |
| 386 | 386 | $conditionSql = $conditionSql |
| 387 | - ? $conditionSql . ' AND ' . $filterSql |
|
| 387 | + ? $conditionSql.' AND '.$filterSql |
|
| 388 | 388 | : $filterSql; |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | $sql = 'SELECT COUNT(*) ' |
| 392 | - . 'FROM ' . $tableName . ' ' . $baseTableAlias |
|
| 392 | + . 'FROM '.$tableName.' '.$baseTableAlias |
|
| 393 | 393 | . $joinSql |
| 394 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
| 394 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
| 395 | 395 | |
| 396 | 396 | return $sql; |
| 397 | 397 | } |
@@ -410,16 +410,16 @@ discard block |
||
| 410 | 410 | $conditions = array(); |
| 411 | 411 | $tableAlias = $this->getSQLTableAlias($parentClassName); |
| 412 | 412 | $parentClass = $this->em->getClassMetadata($parentClassName); |
| 413 | - $joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
| 413 | + $joinSql .= ' INNER JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON '; |
|
| 414 | 414 | |
| 415 | 415 | foreach ($identifierColumns as $idColumn) { |
| 416 | - $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; |
|
| 416 | + $conditions[] = $baseTableAlias.'.'.$idColumn.' = '.$tableAlias.'.'.$idColumn; |
|
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | $joinSql .= implode(' AND ', $conditions); |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | - return parent::getLockTablesSql($lockMode) . $joinSql; |
|
| 422 | + return parent::getLockTablesSql($lockMode).$joinSql; |
|
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | /** |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | ? $baseTableAlias |
| 489 | 489 | : $this->getSQLTableAlias($this->class->rootEntityName); |
| 490 | 490 | |
| 491 | - $columnList[] = $tableAlias . '.' . $discrColumn; |
|
| 491 | + $columnList[] = $tableAlias.'.'.$discrColumn; |
|
| 492 | 492 | |
| 493 | 493 | // sub tables |
| 494 | 494 | foreach ($this->class->subClasses as $subClassName) { |
@@ -603,11 +603,11 @@ discard block |
||
| 603 | 603 | $conditions = array(); |
| 604 | 604 | $parentClass = $this->em->getClassMetadata($parentClassName); |
| 605 | 605 | $tableAlias = $this->getSQLTableAlias($parentClassName); |
| 606 | - $joinSql .= ' INNER JOIN ' . $this->quoteStrategy->getTableName($parentClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
| 606 | + $joinSql .= ' INNER JOIN '.$this->quoteStrategy->getTableName($parentClass, $this->platform).' '.$tableAlias.' ON '; |
|
| 607 | 607 | |
| 608 | 608 | |
| 609 | 609 | foreach ($identifierColumn as $idColumn) { |
| 610 | - $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; |
|
| 610 | + $conditions[] = $baseTableAlias.'.'.$idColumn.' = '.$tableAlias.'.'.$idColumn; |
|
| 611 | 611 | } |
| 612 | 612 | |
| 613 | 613 | $joinSql .= implode(' AND ', $conditions); |
@@ -618,10 +618,10 @@ discard block |
||
| 618 | 618 | $conditions = array(); |
| 619 | 619 | $subClass = $this->em->getClassMetadata($subClassName); |
| 620 | 620 | $tableAlias = $this->getSQLTableAlias($subClassName); |
| 621 | - $joinSql .= ' LEFT JOIN ' . $this->quoteStrategy->getTableName($subClass, $this->platform) . ' ' . $tableAlias . ' ON '; |
|
| 621 | + $joinSql .= ' LEFT JOIN '.$this->quoteStrategy->getTableName($subClass, $this->platform).' '.$tableAlias.' ON '; |
|
| 622 | 622 | |
| 623 | 623 | foreach ($identifierColumn as $idColumn) { |
| 624 | - $conditions[] = $baseTableAlias . '.' . $idColumn . ' = ' . $tableAlias . '.' . $idColumn; |
|
| 624 | + $conditions[] = $baseTableAlias.'.'.$idColumn.' = '.$tableAlias.'.'.$idColumn; |
|
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | $joinSql .= implode(' AND ', $conditions); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * @param PathExpression $pathExpression |
| 47 | - * @param InputParameter|ArithmeticExpression|null $newValue |
|
| 47 | + * @param ArithmeticExpression|null $newValue |
|
| 48 | 48 | */ |
| 49 | 49 | public function __construct($pathExpression, $newValue) |
| 50 | 50 | { |