@@ -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) { |
@@ -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 |
@@ -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(); |