@@ -20,7 +20,6 @@ |
||
20 | 20 | |
21 | 21 | use Doctrine\DBAL\Types\Type; |
22 | 22 | use Doctrine\ORM\Mapping\ClassMetadataInfo; |
23 | -use Doctrine\ORM\ORMException; |
|
24 | 23 | use Doctrine\ORM\Query; |
25 | 24 | use Doctrine\ORM\Query\TreeWalkerAdapter; |
26 | 25 | use Doctrine\ORM\Query\AST\Functions\IdentityFunction; |
@@ -112,7 +112,7 @@ |
||
112 | 112 | |
113 | 113 | $AST->selectClause->selectExpressions[] = new SelectExpression( |
114 | 114 | $this->createSelectExpressionItem($item->expression), |
115 | - '_dctrn_ord' . $this->_aliasCounter++ |
|
115 | + '_dctrn_ord'.$this->_aliasCounter++ |
|
116 | 116 | ); |
117 | 117 | } |
118 | 118 | } |
@@ -26,7 +26,6 @@ discard block |
||
26 | 26 | use Exception; |
27 | 27 | use InvalidArgumentException; |
28 | 28 | use UnexpectedValueException; |
29 | - |
|
30 | 29 | use Doctrine\Common\Collections\ArrayCollection; |
31 | 30 | use Doctrine\Common\Collections\Collection; |
32 | 31 | use Doctrine\Common\NotifyPropertyChanged; |
@@ -34,14 +33,12 @@ discard block |
||
34 | 33 | use Doctrine\Common\Persistence\ObjectManagerAware; |
35 | 34 | use Doctrine\ORM\Mapping\ClassMetadata; |
36 | 35 | use Doctrine\ORM\Proxy\Proxy; |
37 | - |
|
38 | 36 | use Doctrine\ORM\Event\LifecycleEventArgs; |
39 | 37 | use Doctrine\ORM\Event\PreUpdateEventArgs; |
40 | 38 | use Doctrine\ORM\Event\PreFlushEventArgs; |
41 | 39 | use Doctrine\ORM\Event\OnFlushEventArgs; |
42 | 40 | use Doctrine\ORM\Event\PostFlushEventArgs; |
43 | 41 | use Doctrine\ORM\Event\ListenersInvoker; |
44 | - |
|
45 | 42 | use Doctrine\ORM\Cache\Persister\CachedPersister; |
46 | 43 | use Doctrine\ORM\Persisters\Entity\BasicEntityPersister; |
47 | 44 | use Doctrine\ORM\Persisters\Entity\SingleTablePersister; |
@@ -49,7 +46,6 @@ discard block |
||
49 | 46 | use Doctrine\ORM\Persisters\Collection\OneToManyPersister; |
50 | 47 | use Doctrine\ORM\Persisters\Collection\ManyToManyPersister; |
51 | 48 | use Doctrine\ORM\Utility\IdentifierFlattener; |
52 | -use Doctrine\ORM\Cache\AssociationCacheEntry; |
|
53 | 49 | |
54 | 50 | /** |
55 | 51 | * The UnitOfWork is responsible for tracking changes to objects during an |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | $state = $this->getEntityState($entity); |
465 | 465 | |
466 | 466 | if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { |
467 | - throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation " . self::objToStr($entity)); |
|
467 | + throw new \InvalidArgumentException("Entity has to be managed or scheduled for removal for single computation ".self::objToStr($entity)); |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | $class = $this->em->getClassMetadata(get_class($entity)); |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | if ($owner === null) { // cloned |
683 | 683 | $actualValue->setOwner($entity, $assoc); |
684 | 684 | } else if ($owner !== $entity) { // no clone, we have to fix |
685 | - if (!$actualValue->isInitialized()) { |
|
685 | + if ( ! $actualValue->isInitialized()) { |
|
686 | 686 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
687 | 687 | } |
688 | 688 | $newValue = clone $actualValue; |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | $targetClass = $this->em->getClassMetadata($assoc['targetEntity']); |
829 | 829 | |
830 | 830 | foreach ($unwrappedValue as $key => $entry) { |
831 | - if (! ($entry instanceof $targetClass->name)) { |
|
831 | + if ( ! ($entry instanceof $targetClass->name)) { |
|
832 | 832 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $assoc, $entry); |
833 | 833 | } |
834 | 834 | |
@@ -1687,7 +1687,7 @@ discard block |
||
1687 | 1687 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
1688 | 1688 | |
1689 | 1689 | default: |
1690 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1690 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1691 | 1691 | } |
1692 | 1692 | |
1693 | 1693 | $this->cascadePersist($entity, $visited); |
@@ -1757,7 +1757,7 @@ discard block |
||
1757 | 1757 | case self::STATE_DETACHED: |
1758 | 1758 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
1759 | 1759 | default: |
1760 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1760 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1761 | 1761 | } |
1762 | 1762 | |
1763 | 1763 | } |
@@ -1908,7 +1908,7 @@ discard block |
||
1908 | 1908 | */ |
1909 | 1909 | private function isLoaded($entity) |
1910 | 1910 | { |
1911 | - return !($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1911 | + return ! ($entity instanceof Proxy) || $entity->__isInitialized(); |
|
1912 | 1912 | } |
1913 | 1913 | |
1914 | 1914 | /** |
@@ -2066,7 +2066,7 @@ discard block |
||
2066 | 2066 | |
2067 | 2067 | $associationMappings = array_filter( |
2068 | 2068 | $class->associationMappings, |
2069 | - function ($assoc) { return $assoc['isCascadeRefresh']; } |
|
2069 | + function($assoc) { return $assoc['isCascadeRefresh']; } |
|
2070 | 2070 | ); |
2071 | 2071 | |
2072 | 2072 | foreach ($associationMappings as $assoc) { |
@@ -2109,7 +2109,7 @@ discard block |
||
2109 | 2109 | |
2110 | 2110 | $associationMappings = array_filter( |
2111 | 2111 | $class->associationMappings, |
2112 | - function ($assoc) { return $assoc['isCascadeDetach']; } |
|
2112 | + function($assoc) { return $assoc['isCascadeDetach']; } |
|
2113 | 2113 | ); |
2114 | 2114 | |
2115 | 2115 | foreach ($associationMappings as $assoc) { |
@@ -2153,7 +2153,7 @@ discard block |
||
2153 | 2153 | |
2154 | 2154 | $associationMappings = array_filter( |
2155 | 2155 | $class->associationMappings, |
2156 | - function ($assoc) { return $assoc['isCascadeMerge']; } |
|
2156 | + function($assoc) { return $assoc['isCascadeMerge']; } |
|
2157 | 2157 | ); |
2158 | 2158 | |
2159 | 2159 | foreach ($associationMappings as $assoc) { |
@@ -2192,7 +2192,7 @@ discard block |
||
2192 | 2192 | |
2193 | 2193 | $associationMappings = array_filter( |
2194 | 2194 | $class->associationMappings, |
2195 | - function ($assoc) { return $assoc['isCascadePersist']; } |
|
2195 | + function($assoc) { return $assoc['isCascadePersist']; } |
|
2196 | 2196 | ); |
2197 | 2197 | |
2198 | 2198 | foreach ($associationMappings as $assoc) { |
@@ -2221,7 +2221,7 @@ discard block |
||
2221 | 2221 | break; |
2222 | 2222 | |
2223 | 2223 | case ($relatedEntities !== null): |
2224 | - if (! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2224 | + if ( ! $relatedEntities instanceof $assoc['targetEntity']) { |
|
2225 | 2225 | throw ORMInvalidArgumentException::invalidAssociation( |
2226 | 2226 | $this->em->getClassMetadata($assoc['targetEntity']), |
2227 | 2227 | $assoc, |
@@ -2252,13 +2252,13 @@ discard block |
||
2252 | 2252 | |
2253 | 2253 | $associationMappings = array_filter( |
2254 | 2254 | $class->associationMappings, |
2255 | - function ($assoc) { return $assoc['isCascadeRemove']; } |
|
2255 | + function($assoc) { return $assoc['isCascadeRemove']; } |
|
2256 | 2256 | ); |
2257 | 2257 | |
2258 | 2258 | $entitiesToCascade = array(); |
2259 | 2259 | |
2260 | 2260 | foreach ($associationMappings as $assoc) { |
2261 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2261 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2262 | 2262 | $entity->__load(); |
2263 | 2263 | } |
2264 | 2264 | |
@@ -2322,7 +2322,7 @@ discard block |
||
2322 | 2322 | return; |
2323 | 2323 | } |
2324 | 2324 | |
2325 | - if ($entity instanceof Proxy && !$entity->__isInitialized__) { |
|
2325 | + if ($entity instanceof Proxy && ! $entity->__isInitialized__) { |
|
2326 | 2326 | $entity->__load(); |
2327 | 2327 | } |
2328 | 2328 | |
@@ -2337,7 +2337,7 @@ discard block |
||
2337 | 2337 | case LockMode::NONE === $lockMode: |
2338 | 2338 | case LockMode::PESSIMISTIC_READ === $lockMode: |
2339 | 2339 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
2340 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
2340 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
2341 | 2341 | throw TransactionRequiredException::transactionRequired(); |
2342 | 2342 | } |
2343 | 2343 | |
@@ -2682,7 +2682,7 @@ discard block |
||
2682 | 2682 | // then we can append this entity for eager loading! |
2683 | 2683 | if ($hints['fetchMode'][$class->name][$field] == ClassMetadata::FETCH_EAGER && |
2684 | 2684 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2685 | - !$targetClass->isIdentifierComposite && |
|
2685 | + ! $targetClass->isIdentifierComposite && |
|
2686 | 2686 | $newValue instanceof Proxy && |
2687 | 2687 | $newValue->__isInitialized__ === false) { |
2688 | 2688 | |
@@ -2994,7 +2994,7 @@ discard block |
||
2994 | 2994 | */ |
2995 | 2995 | public function size() |
2996 | 2996 | { |
2997 | - $countArray = array_map(function ($item) { return count($item); }, $this->identityMap); |
|
2997 | + $countArray = array_map(function($item) { return count($item); }, $this->identityMap); |
|
2998 | 2998 | |
2999 | 2999 | return array_sum($countArray); |
3000 | 3000 | } |
@@ -3053,7 +3053,7 @@ discard block |
||
3053 | 3053 | public function getCollectionPersister(array $association) |
3054 | 3054 | { |
3055 | 3055 | $role = isset($association['cache']) |
3056 | - ? $association['sourceEntity'] . '::' . $association['fieldName'] |
|
3056 | + ? $association['sourceEntity'].'::'.$association['fieldName'] |
|
3057 | 3057 | : $association['type']; |
3058 | 3058 | |
3059 | 3059 | if (isset($this->collectionPersisters[$role])) { |
@@ -3271,7 +3271,7 @@ discard block |
||
3271 | 3271 | */ |
3272 | 3272 | private function afterTransactionComplete() |
3273 | 3273 | { |
3274 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3274 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3275 | 3275 | $persister->afterTransactionComplete(); |
3276 | 3276 | }); |
3277 | 3277 | } |
@@ -3281,7 +3281,7 @@ discard block |
||
3281 | 3281 | */ |
3282 | 3282 | private function afterTransactionRolledBack() |
3283 | 3283 | { |
3284 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
3284 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
3285 | 3285 | $persister->afterTransactionRolledBack(); |
3286 | 3286 | }); |
3287 | 3287 | } |
@@ -3380,7 +3380,7 @@ discard block |
||
3380 | 3380 | if ($other === null) { |
3381 | 3381 | $prop->setValue($managedCopy, null); |
3382 | 3382 | } else { |
3383 | - if ($other instanceof Proxy && !$other->__isInitialized()) { |
|
3383 | + if ($other instanceof Proxy && ! $other->__isInitialized()) { |
|
3384 | 3384 | // do not merge fields marked lazy that have not been fetched. |
3385 | 3385 | continue; |
3386 | 3386 | } |
@@ -3139,7 +3139,7 @@ discard block |
||
3139 | 3139 | } |
3140 | 3140 | |
3141 | 3141 | /** |
3142 | - * @param $class |
|
3142 | + * @param \Doctrine\Common\Persistence\Mapping\ClassMetadata $class |
|
3143 | 3143 | * @param string $oid |
3144 | 3144 | */ |
3145 | 3145 | public function clearScheduledForSynchronization($class, $oid) { |
@@ -3355,7 +3355,7 @@ discard block |
||
3355 | 3355 | /** |
3356 | 3356 | * Verifies if two given entities actually are the same based on identifier comparison |
3357 | 3357 | * |
3358 | - * @param object $entity1 |
|
3358 | + * @param Proxy $entity1 |
|
3359 | 3359 | * @param object $entity2 |
3360 | 3360 | * |
3361 | 3361 | * @return bool |
@@ -12,11 +12,11 @@ |
||
12 | 12 | use Entities\Address; |
13 | 13 | use Entities\User; |
14 | 14 | |
15 | -$em = require_once __DIR__ . '/bootstrap.php'; |
|
15 | +$em = require_once __DIR__.'/bootstrap.php'; |
|
16 | 16 | |
17 | 17 | ## PUT YOUR TEST CODE BELOW |
18 | 18 | |
19 | 19 | $user = new User; |
20 | 20 | $address = new Address; |
21 | 21 | |
22 | -echo 'Hello World!' . PHP_EOL; |
|
22 | +echo 'Hello World!'.PHP_EOL; |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | |
6 | 6 | // Path to composer autoloader. You can use different provided by your favorite framework, |
7 | 7 | // if you want to. |
8 | -$loaderPath = __DIR__ . '/../../vendor/autoload.php'; |
|
9 | -if(!is_readable($loaderPath)){ |
|
8 | +$loaderPath = __DIR__.'/../../vendor/autoload.php'; |
|
9 | +if ( ! is_readable($loaderPath)) { |
|
10 | 10 | throw new LogicException('Run php composer.phar install at first'); |
11 | 11 | } |
12 | 12 | $loader = require $loaderPath; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $config = new \Doctrine\ORM\Configuration(); |
20 | 20 | |
21 | 21 | // Set up Metadata Drivers |
22 | -$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__ . "/Entities")); |
|
22 | +$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities")); |
|
23 | 23 | $config->setMetadataDriverImpl($driverImpl); |
24 | 24 | |
25 | 25 | // Set up caches, depending on $debug variable. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $config->setQueryCacheImpl($cache); |
30 | 30 | |
31 | 31 | // Proxy configuration |
32 | -$config->setProxyDir(__DIR__ . '/Proxies'); |
|
32 | +$config->setProxyDir(__DIR__.'/Proxies'); |
|
33 | 33 | $config->setProxyNamespace('Proxies'); |
34 | 34 | |
35 | 35 | // Database connection information |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function generate(EntityManager $em, $entity) |
36 | 36 | { |
37 | 37 | $conn = $em->getConnection(); |
38 | - $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression(); |
|
38 | + $sql = 'SELECT '.$conn->getDatabasePlatform()->getGuidExpression(); |
|
39 | 39 | |
40 | 40 | return $conn->query($sql)->fetchColumn(0); |
41 | 41 | } |
@@ -92,7 +92,7 @@ |
||
92 | 92 | $this->_tableName, $this->_sequenceName, $this->_allocationSize |
93 | 93 | ); |
94 | 94 | |
95 | - if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel+1)) !== 1) { |
|
95 | + if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel + 1)) !== 1) { |
|
96 | 96 | // no affected rows, concurrency issue, throw exception |
97 | 97 | } |
98 | 98 | } else { |
@@ -95,15 +95,15 @@ |
||
95 | 95 | $expressionList[] = $this->dispatch($child); |
96 | 96 | } |
97 | 97 | |
98 | - switch($expr->getType()) { |
|
98 | + switch ($expr->getType()) { |
|
99 | 99 | case CompositeExpression::TYPE_AND: |
100 | - return '(' . implode(' AND ', $expressionList) . ')'; |
|
100 | + return '('.implode(' AND ', $expressionList).')'; |
|
101 | 101 | |
102 | 102 | case CompositeExpression::TYPE_OR: |
103 | - return '(' . implode(' OR ', $expressionList) . ')'; |
|
103 | + return '('.implode(' OR ', $expressionList).')'; |
|
104 | 104 | |
105 | 105 | default: |
106 | - throw new \RuntimeException("Unknown composite " . $expr->getType()); |
|
106 | + throw new \RuntimeException("Unknown composite ".$expr->getType()); |
|
107 | 107 | } |
108 | 108 | } |
109 | 109 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | static public function matchingAssocationFieldRequiresObject($class, $associationName) |
30 | 30 | { |
31 | 31 | return new self(sprintf( |
32 | - "Cannot match on %s::%s with a non-object value. Matching objects by id is " . |
|
32 | + "Cannot match on %s::%s with a non-object value. Matching objects by id is ". |
|
33 | 33 | "not compatible with matching on an in-memory collection, which compares objects by reference.", |
34 | 34 | $class, $associationName |
35 | 35 | )); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | foreach ($joinColumns as $joinColumn) { |
133 | 133 | $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform); |
134 | 134 | $referencedName = $joinColumn['referencedColumnName']; |
135 | - $conditions[] = 't.' . $columnName . ' = ?'; |
|
135 | + $conditions[] = 't.'.$columnName.' = ?'; |
|
136 | 136 | $params[] = $id[$sourceClass->getFieldForColumn($referencedName)]; |
137 | 137 | $types[] = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em); |
138 | 138 | } |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | }*/ |
162 | 162 | |
163 | 163 | $sql = 'SELECT COUNT(*)' |
164 | - . ' FROM ' . $joinTableName . ' t' |
|
164 | + . ' FROM '.$joinTableName.' t' |
|
165 | 165 | . $joinTargetEntitySQL |
166 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
166 | + . ' WHERE '.implode(' AND ', $conditions); |
|
167 | 167 | |
168 | 168 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
169 | 169 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
193 | 193 | |
194 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
194 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
195 | 195 | |
196 | 196 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
197 | 197 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); |
209 | 209 | |
210 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
210 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
211 | 211 | |
212 | 212 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
213 | 213 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); |
225 | 225 | |
226 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
226 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
227 | 227 | |
228 | 228 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
229 | 229 | } |
@@ -260,11 +260,11 @@ discard block |
||
260 | 260 | $rsm = new Query\ResultSetMappingBuilder($this->em); |
261 | 261 | $rsm->addRootEntityFromClassMetadata($mapping['targetEntity'], 'te'); |
262 | 262 | |
263 | - $sql = 'SELECT ' . $rsm->generateSelectClause() |
|
264 | - . ' FROM ' . $tableName . ' te' |
|
265 | - . ' JOIN ' . $joinTable . ' t ON' |
|
263 | + $sql = 'SELECT '.$rsm->generateSelectClause() |
|
264 | + . ' FROM '.$tableName.' te' |
|
265 | + . ' JOIN '.$joinTable.' t ON' |
|
266 | 266 | . implode(' AND ', $onConditions) |
267 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
267 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
268 | 268 | |
269 | 269 | $stmt = $this->conn->executeQuery($sql, $params); |
270 | 270 | |
@@ -301,8 +301,8 @@ discard block |
||
301 | 301 | |
302 | 302 | // A join is needed if there is filtering on the target entity |
303 | 303 | $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); |
304 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
305 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
304 | + $joinSql = ' JOIN '.$tableName.' te' |
|
305 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
306 | 306 | |
307 | 307 | return array($joinSql, $filterSql); |
308 | 308 | } |
@@ -321,12 +321,12 @@ discard block |
||
321 | 321 | |
322 | 322 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
323 | 323 | if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
324 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
324 | + $filterClauses[] = '('.$filterExpr.')'; |
|
325 | 325 | } |
326 | 326 | } |
327 | 327 | |
328 | 328 | return $filterClauses |
329 | - ? '(' . implode(' AND ', $filterClauses) . ')' |
|
329 | + ? '('.implode(' AND ', $filterClauses).')' |
|
330 | 330 | : ''; |
331 | 331 | } |
332 | 332 | |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
355 | 355 | $refColumnName = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
356 | 356 | |
357 | - $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName; |
|
357 | + $conditions[] = ' t.'.$joinColumnName.' = '.'te.'.$refColumnName; |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | return $conditions; |
@@ -376,8 +376,8 @@ discard block |
||
376 | 376 | $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
377 | 377 | } |
378 | 378 | |
379 | - return 'DELETE FROM ' . $joinTable |
|
380 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
379 | + return 'DELETE FROM '.$joinTable |
|
380 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
@@ -436,8 +436,8 @@ discard block |
||
436 | 436 | } |
437 | 437 | |
438 | 438 | return array( |
439 | - 'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
440 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?', |
|
439 | + 'DELETE FROM '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
440 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?', |
|
441 | 441 | $types, |
442 | 442 | ); |
443 | 443 | } |
@@ -485,10 +485,10 @@ discard block |
||
485 | 485 | } |
486 | 486 | |
487 | 487 | return array( |
488 | - 'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
489 | - . ' (' . implode(', ', $columns) . ')' |
|
488 | + 'INSERT INTO '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
489 | + . ' ('.implode(', ', $columns).')' |
|
490 | 490 | . ' VALUES' |
491 | - . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')', |
|
491 | + . ' ('.implode(', ', array_fill(0, count($columns), '?')).')', |
|
492 | 492 | $types, |
493 | 493 | ); |
494 | 494 | } |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); |
574 | 574 | $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); |
575 | 575 | |
576 | - if (! $mapping['isOwningSide']) { |
|
576 | + if ( ! $mapping['isOwningSide']) { |
|
577 | 577 | $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']); |
578 | 578 | $mapping = $associationSourceClass->associationMappings[$mapping['mappedBy']]; |
579 | 579 | $joinColumns = $mapping['joinTable']['joinColumns']; |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | $targetRelationMode = 'relationToTargetKeyColumns'; |
587 | 587 | } |
588 | 588 | |
589 | - $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t'; |
|
589 | + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform).' t'; |
|
590 | 590 | $whereClauses = array(); |
591 | 591 | $params = array(); |
592 | 592 | $types = array(); |
@@ -597,14 +597,14 @@ discard block |
||
597 | 597 | $joinConditions = array(); |
598 | 598 | |
599 | 599 | foreach ($joinColumns as $joinTableColumn) { |
600 | - $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName']; |
|
600 | + $joinConditions[] = 't.'.$joinTableColumn['name'].' = tr.'.$joinTableColumn['referencedColumnName']; |
|
601 | 601 | } |
602 | 602 | |
603 | 603 | $tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); |
604 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
604 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
605 | 605 | $columnName = $targetClass->getColumnName($indexBy); |
606 | 606 | |
607 | - $whereClauses[] = 'tr.' . $columnName . ' = ?'; |
|
607 | + $whereClauses[] = 'tr.'.$columnName.' = ?'; |
|
608 | 608 | $params[] = $key; |
609 | 609 | $types[] = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em); |
610 | 610 | } |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
613 | 613 | if (isset($mapping[$sourceRelationMode][$joinTableColumn])) { |
614 | 614 | $column = $mapping[$sourceRelationMode][$joinTableColumn]; |
615 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
615 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
616 | 616 | $params[] = $sourceClass->containsForeignIdentifier |
617 | 617 | ? $id[$sourceClass->getFieldForColumn($column)] |
618 | 618 | : $id[$sourceClass->fieldNames[$column]]; |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | } elseif ( ! $joinNeeded) { |
621 | 621 | $column = $mapping[$targetRelationMode][$joinTableColumn]; |
622 | 622 | |
623 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
623 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
624 | 624 | $params[] = $key; |
625 | 625 | $types[] = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em); |
626 | 626 | } |
@@ -630,7 +630,7 @@ discard block |
||
630 | 630 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
631 | 631 | |
632 | 632 | if ($filterSql) { |
633 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
633 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
634 | 634 | $whereClauses[] = $filterSql; |
635 | 635 | } |
636 | 636 | } |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | $types = array(); |
675 | 675 | |
676 | 676 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
677 | - $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?'; |
|
677 | + $whereClauses[] = ($addFilters ? 't.' : '').$joinTableColumn.' = ?'; |
|
678 | 678 | |
679 | 679 | if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) { |
680 | 680 | $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn]; |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
697 | 697 | |
698 | 698 | if ($filterSql) { |
699 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
699 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
700 | 700 | $whereClauses[] = $filterSql; |
701 | 701 | } |
702 | 702 | } |