@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function joinColumnName($propertyName, $className = null) |
73 | 73 | { |
74 | - return $propertyName . '_' . $this->referenceColumnName(); |
|
74 | + return $propertyName.'_'.$this->referenceColumnName(); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) |
81 | 81 | { |
82 | - return strtolower($this->classToTableName($sourceEntity) . '_' . |
|
82 | + return strtolower($this->classToTableName($sourceEntity).'_'. |
|
83 | 83 | $this->classToTableName($targetEntity)); |
84 | 84 | } |
85 | 85 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function joinKeyColumnName($entityName, $referencedColumnName = null) |
90 | 90 | { |
91 | - return strtolower($this->classToTableName($entityName) . '_' . |
|
91 | + return strtolower($this->classToTableName($entityName).'_'. |
|
92 | 92 | ($referencedColumnName ?: $this->referenceColumnName())); |
93 | 93 | } |
94 | 94 | } |
@@ -155,9 +155,9 @@ |
||
155 | 155 | } |
156 | 156 | |
157 | 157 | if ($property->isProtected()) { |
158 | - return "\0*\0" . $propertyName; |
|
158 | + return "\0*\0".$propertyName; |
|
159 | 159 | } |
160 | 160 | |
161 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $propertyName; |
|
161 | + return "\0".$property->getDeclaringClass()->getName()."\0".$propertyName; |
|
162 | 162 | } |
163 | 163 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | public function resolve($className) |
68 | 68 | { |
69 | 69 | if (isset($this->instances[$className = trim($className, '\\')])) { |
70 | - return $this->instances[$className]; |
|
70 | + return $this->instances[$className]; |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | return $this->instances[$className] = new $className(); |
@@ -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,10 +20,8 @@ |
||
20 | 20 | namespace Doctrine\ORM\Persisters\Collection; |
21 | 21 | |
22 | 22 | use Doctrine\Common\Collections\Criteria; |
23 | -use Doctrine\DBAL\Types\Type; |
|
24 | 23 | use Doctrine\ORM\Mapping\ColumnMetadata; |
25 | 24 | use Doctrine\ORM\PersistentCollection; |
26 | -use Doctrine\ORM\Utility\PersisterHelper; |
|
27 | 25 | |
28 | 26 | /** |
29 | 27 | * Persister for one-to-many collections. |
@@ -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 | } |
@@ -261,18 +261,18 @@ discard block |
||
261 | 261 | ); |
262 | 262 | } |
263 | 263 | |
264 | - $statement = $this->platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable |
|
265 | - . ' (' . $this->platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; |
|
264 | + $statement = $this->platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable |
|
265 | + . ' ('.$this->platform->getColumnDeclarationListSQL($columnDefinitions).')'; |
|
266 | 266 | |
267 | 267 | $this->conn->executeUpdate($statement); |
268 | 268 | |
269 | 269 | // 2) Build insert table records into temporary table |
270 | 270 | $query = $this->em->createQuery( |
271 | - ' SELECT t0.' . implode(', t0.', $rootClass->getIdentifierFieldNames()) |
|
272 | - . ' FROM ' . $targetClass->name . ' t0 WHERE t0.' . $mapping['mappedBy'] . ' = :owner' |
|
271 | + ' SELECT t0.'.implode(', t0.', $rootClass->getIdentifierFieldNames()) |
|
272 | + . ' FROM '.$targetClass->name.' t0 WHERE t0.'.$mapping['mappedBy'].' = :owner' |
|
273 | 273 | )->setParameter('owner', $collection->getOwner()); |
274 | 274 | |
275 | - $statement = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ') ' . $query->getSQL(); |
|
275 | + $statement = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.') '.$query->getSQL(); |
|
276 | 276 | $parameters = array_values($sourceClass->getIdentifierValues($collection->getOwner())); |
277 | 277 | $numDeleted = $this->conn->executeUpdate($statement, $parameters); |
278 | 278 | |
@@ -281,8 +281,8 @@ discard block |
||
281 | 281 | |
282 | 282 | foreach (array_reverse($classNames) as $className) { |
283 | 283 | $tableName = $this->quoteStrategy->getTableName($this->em->getClassMetadata($className), $this->platform); |
284 | - $statement = 'DELETE FROM ' . $tableName . ' WHERE (' . $idColumnNameList . ')' |
|
285 | - . ' IN (SELECT ' . $idColumnNameList . ' FROM ' . $tempTable . ')'; |
|
284 | + $statement = 'DELETE FROM '.$tableName.' WHERE ('.$idColumnNameList.')' |
|
285 | + . ' IN (SELECT '.$idColumnNameList.' FROM '.$tempTable.')'; |
|
286 | 286 | |
287 | 287 | $this->conn->executeUpdate($statement); |
288 | 288 | } |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | */ |
42 | 42 | abstract class AbstractEntityPersister implements CachedEntityPersister |
43 | 43 | { |
44 | - /** |
|
45 | - * @var \Doctrine\ORM\UnitOfWork |
|
46 | - */ |
|
44 | + /** |
|
45 | + * @var \Doctrine\ORM\UnitOfWork |
|
46 | + */ |
|
47 | 47 | protected $uow; |
48 | 48 | |
49 | 49 | /** |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | */ |
62 | 62 | protected $class; |
63 | 63 | |
64 | - /** |
|
65 | - * @var array |
|
66 | - */ |
|
64 | + /** |
|
65 | + * @var array |
|
66 | + */ |
|
67 | 67 | protected $queuedCache = array(); |
68 | 68 | |
69 | 69 | /** |
@@ -715,9 +715,9 @@ |
||
715 | 715 | ); |
716 | 716 | } |
717 | 717 | |
718 | - /** |
|
719 | - * {@inheritdoc} |
|
720 | - */ |
|
718 | + /** |
|
719 | + * {@inheritdoc} |
|
720 | + */ |
|
721 | 721 | protected function getHash() |
722 | 722 | { |
723 | 723 | return sha1(parent::getHash(). '-'. $this->_firstResult . '-' . $this->_maxResults); |
@@ -220,7 +220,7 @@ |
||
220 | 220 | $exporter->setMetadata($metadata); |
221 | 221 | $exporter->export(); |
222 | 222 | |
223 | - $output->writeln(PHP_EOL . sprintf( |
|
223 | + $output->writeln(PHP_EOL.sprintf( |
|
224 | 224 | 'Converting Doctrine 1.X schema to "<info>%s</info>" mapping type in "<info>%s</info>"', $toType, $destPath |
225 | 225 | )); |
226 | 226 | } else { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | /** |
34 | 34 | * @var string |
35 | 35 | */ |
36 | - protected $preSeparator = ''; |
|
36 | + protected $preSeparator = ''; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var string |
@@ -918,7 +918,7 @@ |
||
918 | 918 | * @since 2.5 |
919 | 919 | * |
920 | 920 | * @param string $name The name of the hint. |
921 | - * @param mixed $value The value of the hint. |
|
921 | + * @param string $value The value of the hint. |
|
922 | 922 | */ |
923 | 923 | public function setDefaultQueryHint($name, $value) |
924 | 924 | { |
@@ -151,7 +151,7 @@ |
||
151 | 151 | */ |
152 | 152 | public function newDefaultAnnotationDriver($paths = array(), $useSimpleAnnotationReader = true) |
153 | 153 | { |
154 | - AnnotationRegistry::registerFile(__DIR__ . '/Annotation/DoctrineAnnotations.php'); |
|
154 | + AnnotationRegistry::registerFile(__DIR__.'/Annotation/DoctrineAnnotations.php'); |
|
155 | 155 | |
156 | 156 | if ($useSimpleAnnotationReader) { |
157 | 157 | // Register the ORM Annotations in the AnnotationRegistry |