@@ -275,7 +275,7 @@ |
||
| 275 | 275 | { |
| 276 | 276 | $cm = $this->builder->getClassMetadata(); |
| 277 | 277 | if ($this->generatedValue) { |
| 278 | - $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue)); |
|
| 278 | + $cm->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_'.$this->generatedValue)); |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | if ($this->version) { |
@@ -180,7 +180,7 @@ |
||
| 180 | 180 | * Sets an option. |
| 181 | 181 | * |
| 182 | 182 | * @param string $name |
| 183 | - * @param mixed $value |
|
| 183 | + * @param boolean $value |
|
| 184 | 184 | * |
| 185 | 185 | * @return FieldBuilder |
| 186 | 186 | */ |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | */ |
| 151 | 151 | public function addIndex(array $columns, $name) |
| 152 | 152 | { |
| 153 | - if (!isset($this->cm->table['indexes'])) { |
|
| 153 | + if ( ! isset($this->cm->table['indexes'])) { |
|
| 154 | 154 | $this->cm->table['indexes'] = array(); |
| 155 | 155 | } |
| 156 | 156 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | /** |
| 144 | 144 | * Adds Index. |
| 145 | 145 | * |
| 146 | - * @param array $columns |
|
| 146 | + * @param string[] $columns |
|
| 147 | 147 | * @param string $name |
| 148 | 148 | * |
| 149 | 149 | * @return ClassMetadataBuilder |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | /** |
| 163 | 163 | * Adds Unique Constraint. |
| 164 | 164 | * |
| 165 | - * @param array $columns |
|
| 165 | + * @param string[] $columns |
|
| 166 | 166 | * @param string $name |
| 167 | 167 | * |
| 168 | 168 | * @return ClassMetadataBuilder |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | protected function onNotFoundMetadata($className) |
| 107 | 107 | { |
| 108 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
| 108 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
| 109 | 109 | return; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $this->completeIdGeneratorMapping($class); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if (!$class->isMappedSuperclass) { |
|
| 165 | + if ( ! $class->isMappedSuperclass) { |
|
| 166 | 166 | foreach ($class->embeddedClasses as $property => $embeddableClass) { |
| 167 | 167 | |
| 168 | 168 | if (isset($embeddableClass['inherited'])) { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | $identifier = $embeddableMetadata->getIdentifier(); |
| 189 | 189 | |
| 190 | - if (! empty($identifier)) { |
|
| 190 | + if ( ! empty($identifier)) { |
|
| 191 | 191 | $this->inheritIdGeneratorMapping($class, $embeddableMetadata); |
| 192 | 192 | } |
| 193 | 193 | |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | */ |
| 258 | 258 | protected function validateRuntimeMetadata($class, $parent) |
| 259 | 259 | { |
| 260 | - if ( ! $class->reflClass ) { |
|
| 260 | + if ( ! $class->reflClass) { |
|
| 261 | 261 | // only validate if there is a reflection class instance |
| 262 | 262 | return; |
| 263 | 263 | } |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
| 268 | 268 | |
| 269 | 269 | // verify inheritance |
| 270 | - if ( ! $class->isMappedSuperclass && !$class->isInheritanceTypeNone()) { |
|
| 270 | + if ( ! $class->isMappedSuperclass && ! $class->isInheritanceTypeNone()) { |
|
| 271 | 271 | if ( ! $parent) { |
| 272 | 272 | if (count($class->discriminatorMap) == 0) { |
| 273 | 273 | throw MappingException::missingDiscriminatorMap($class->name); |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | { |
| 429 | 429 | foreach ($parentClass->associationMappings as $field => $mapping) { |
| 430 | 430 | if ($parentClass->isMappedSuperclass) { |
| 431 | - if ($mapping['type'] & ClassMetadata::TO_MANY && !$mapping['isOwningSide']) { |
|
| 431 | + if ($mapping['type'] & ClassMetadata::TO_MANY && ! $mapping['isOwningSide']) { |
|
| 432 | 432 | throw MappingException::illegalToManyAssociationOnMappedSuperclass($parentClass->name, $field); |
| 433 | 433 | } |
| 434 | 434 | $mapping['sourceEntity'] = $subClass->name; |
@@ -476,11 +476,11 @@ discard block |
||
| 476 | 476 | $embeddableMetadata = $this->getMetadataFor($embeddableClass['class']); |
| 477 | 477 | |
| 478 | 478 | $parentClass->mapEmbedded(array( |
| 479 | - 'fieldName' => $prefix . '.' . $property, |
|
| 479 | + 'fieldName' => $prefix.'.'.$property, |
|
| 480 | 480 | 'class' => $embeddableMetadata->name, |
| 481 | 481 | 'columnPrefix' => $embeddableClass['columnPrefix'], |
| 482 | 482 | 'declaredField' => $embeddableClass['declaredField'] |
| 483 | - ? $prefix . '.' . $embeddableClass['declaredField'] |
|
| 483 | + ? $prefix.'.'.$embeddableClass['declaredField'] |
|
| 484 | 484 | : $prefix, |
| 485 | 485 | 'originalField' => $embeddableClass['originalField'] ?: $property, |
| 486 | 486 | )); |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | */ |
| 498 | 498 | private function addInheritedIndexes(ClassMetadata $subClass, ClassMetadata $parentClass) |
| 499 | 499 | { |
| 500 | - if (! $parentClass->isMappedSuperclass) { |
|
| 500 | + if ( ! $parentClass->isMappedSuperclass) { |
|
| 501 | 501 | return; |
| 502 | 502 | } |
| 503 | 503 | |
@@ -696,14 +696,14 @@ discard block |
||
| 696 | 696 | case ClassMetadata::GENERATOR_TYPE_CUSTOM: |
| 697 | 697 | $definition = $class->customGeneratorDefinition; |
| 698 | 698 | if ( ! class_exists($definition['class'])) { |
| 699 | - throw new ORMException("Can't instantiate custom generator : " . |
|
| 699 | + throw new ORMException("Can't instantiate custom generator : ". |
|
| 700 | 700 | $definition['class']); |
| 701 | 701 | } |
| 702 | 702 | $class->setIdGenerator(new $definition['class']); |
| 703 | 703 | break; |
| 704 | 704 | |
| 705 | 705 | default: |
| 706 | - throw new ORMException("Unknown generator type: " . $class->generatorType); |
|
| 706 | + throw new ORMException("Unknown generator type: ".$class->generatorType); |
|
| 707 | 707 | } |
| 708 | 708 | } |
| 709 | 709 | |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | */ |
| 754 | 754 | protected function getFqcnFromAlias($namespaceAlias, $simpleClassName) |
| 755 | 755 | { |
| 756 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
| 756 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
| 757 | 757 | } |
| 758 | 758 | |
| 759 | 759 | /** |
@@ -777,7 +777,7 @@ discard block |
||
| 777 | 777 | */ |
| 778 | 778 | private function getTargetPlatform() |
| 779 | 779 | { |
| 780 | - if (!$this->targetPlatform) { |
|
| 780 | + if ( ! $this->targetPlatform) { |
|
| 781 | 781 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
| 782 | 782 | } |
| 783 | 783 | |
@@ -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(); |
@@ -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 |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | /** |
| 58 | 58 | * Constructor. |
| 59 | 59 | * |
| 60 | - * @param Query|QueryBuilder $query A Doctrine ORM query or query builder. |
|
| 60 | + * @param Query $query A Doctrine ORM query or query builder. |
|
| 61 | 61 | * @param boolean $fetchJoinCollection Whether the query joins a collection (true by default). |
| 62 | 62 | */ |
| 63 | 63 | public function __construct($query, $fetchJoinCollection = true) |