@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Mapping; |
6 | 6 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function getAllMetadata() |
96 | 96 | { |
97 | - if (! $this->initialized) { |
|
97 | + if ( ! $this->initialized) { |
|
98 | 98 | $this->initialize(); |
99 | 99 | } |
100 | 100 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | |
199 | 199 | try { |
200 | 200 | if ($this->cacheDriver) { |
201 | - $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt); |
|
201 | + $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt); |
|
202 | 202 | |
203 | 203 | if ($cached instanceof ClassMetadata) { |
204 | 204 | $this->loadedMetadata[$realClassName] = $cached; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | } else { |
208 | 208 | foreach ($this->loadMetadata($realClassName) as $loadedClassName) { |
209 | 209 | $this->cacheDriver->save( |
210 | - $loadedClassName . $this->cacheSalt, |
|
210 | + $loadedClassName.$this->cacheSalt, |
|
211 | 211 | $this->loadedMetadata[$loadedClassName], |
212 | 212 | null |
213 | 213 | ); |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | $this->loadMetadata($realClassName); |
218 | 218 | } |
219 | 219 | } catch (MappingException $loadingException) { |
220 | - if (! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName)) { |
|
220 | + if ( ! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName)) { |
|
221 | 221 | throw $loadingException; |
222 | 222 | } |
223 | 223 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @param string $className |
24 | 24 | * @param MappedSuperClassMetadata|null $parent |
25 | 25 | */ |
26 | - public function __construct(string $className, ?MappedSuperClassMetadata $parent = null) |
|
26 | + public function __construct(string $className, ? MappedSuperClassMetadata $parent = null) |
|
27 | 27 | { |
28 | 28 | parent::__construct($className, $parent); |
29 | 29 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Mapping; |
7 | 7 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM; |
6 | 6 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\')); |
382 | 382 | $className = $class->getClassName(); |
383 | 383 | |
384 | - if (! is_array($id)) { |
|
384 | + if ( ! is_array($id)) { |
|
385 | 385 | if ($class->isIdentifierComposite()) { |
386 | 386 | throw ORMInvalidArgumentException::invalidCompositeIdentifier(); |
387 | 387 | } |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | */ |
801 | 801 | public function isOpen() |
802 | 802 | { |
803 | - return (!$this->closed); |
|
803 | + return ( ! $this->closed); |
|
804 | 804 | } |
805 | 805 | |
806 | 806 | /** |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | sprintf( |
912 | 912 | 'Invalid $connection argument of type %s given%s.', |
913 | 913 | is_object($connection) ? get_class($connection) : gettype($connection), |
914 | - is_object($connection) ? '' : ': "' . $connection . '"' |
|
914 | + is_object($connection) ? '' : ': "'.$connection.'"' |
|
915 | 915 | ) |
916 | 916 | ); |
917 | 917 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Proxy\Factory; |
7 | 7 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function setPlaceholder($name, $placeholder) |
152 | 152 | { |
153 | - if (! is_string($placeholder) && ! is_callable($placeholder)) { |
|
153 | + if ( ! is_string($placeholder) && ! is_callable($placeholder)) { |
|
154 | 154 | throw new \InvalidArgumentException( |
155 | 155 | sprintf('Provided placeholder for "%s" must be either a string or a valid callable', $name) |
156 | 156 | ); |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | $classMetadata = $definition->entityClassMetadata; |
516 | 516 | $reflectionClass = $classMetadata->getReflectionClass(); |
517 | 517 | $reflectionMethods = $reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC); |
518 | - $filteredMethods = array_filter($reflectionMethods, function (\ReflectionMethod $reflectionMethod) use ($classMetadata) { |
|
518 | + $filteredMethods = array_filter($reflectionMethods, function(\ReflectionMethod $reflectionMethod) use ($classMetadata) { |
|
519 | 519 | // Do not consider static or constructor |
520 | 520 | if ($reflectionMethod->isConstructor() || $reflectionMethod->isStatic()) { |
521 | 521 | return false; |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | } |
540 | 540 | |
541 | 541 | // Do not consider magic methods |
542 | - $skippedMethods = [ |
|
542 | + $skippedMethods = [ |
|
543 | 543 | '__clone' => true, |
544 | 544 | '__get' => true, |
545 | 545 | '__isset' => true, |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | return ! isset($skippedMethods[strtolower($reflectionMethod->getName())]); |
552 | 552 | }); |
553 | 553 | |
554 | - $methodList = []; |
|
554 | + $methodList = []; |
|
555 | 555 | |
556 | 556 | /** @var \ReflectionMethod $reflectionMethod */ |
557 | 557 | foreach ($filteredMethods as $reflectionMethod) { |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | $parameterDefinition = ''; |
606 | 606 | |
607 | 607 | if ($parameterType = $this->getParameterType($method, $param)) { |
608 | - $parameterDefinition .= $parameterType . ' '; |
|
608 | + $parameterDefinition .= $parameterType.' '; |
|
609 | 609 | } |
610 | 610 | |
611 | 611 | if ($param->isPassedByReference()) { |
@@ -616,10 +616,10 @@ discard block |
||
616 | 616 | $parameterDefinition .= '...'; |
617 | 617 | } |
618 | 618 | |
619 | - $parameterDefinition .= '$' . $param->getName(); |
|
619 | + $parameterDefinition .= '$'.$param->getName(); |
|
620 | 620 | |
621 | 621 | if ($param->isDefaultValueAvailable()) { |
622 | - $parameterDefinition .= ' = ' . var_export($param->getDefaultValue(), true); |
|
622 | + $parameterDefinition .= ' = '.var_export($param->getDefaultValue(), true); |
|
623 | 623 | } |
624 | 624 | |
625 | 625 | $parameterDefinitions[] = $parameterDefinition; |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | private function getParameterType(\ReflectionMethod $method, \ReflectionParameter $parameter) |
638 | 638 | { |
639 | 639 | if (method_exists($parameter, 'hasType')) { |
640 | - if (! $parameter->hasType()) { |
|
640 | + if ( ! $parameter->hasType()) { |
|
641 | 641 | return ''; |
642 | 642 | } |
643 | 643 | |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | $parameterClass = $parameter->getClass(); |
658 | 658 | |
659 | 659 | if ($parameterClass) { |
660 | - return '\\' . $parameterClass->getName(); |
|
660 | + return '\\'.$parameterClass->getName(); |
|
661 | 661 | } |
662 | 662 | } catch (\ReflectionException $previous) { |
663 | 663 | throw new \UnexpectedValueException( |
@@ -683,14 +683,14 @@ discard block |
||
683 | 683 | private function getParameterNamesForInvocation(array $parameters) |
684 | 684 | { |
685 | 685 | return array_map( |
686 | - function (\ReflectionParameter $parameter) { |
|
686 | + function(\ReflectionParameter $parameter) { |
|
687 | 687 | $name = ''; |
688 | 688 | |
689 | 689 | if ($parameter->isVariadic()) { |
690 | 690 | $name .= '...'; |
691 | 691 | } |
692 | 692 | |
693 | - $name .= '$' . $parameter->getName(); |
|
693 | + $name .= '$'.$parameter->getName(); |
|
694 | 694 | |
695 | 695 | return $name; |
696 | 696 | }, |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | private function getMethodReturnType(\ReflectionMethod $method) |
707 | 707 | { |
708 | 708 | return $method->hasReturnType() |
709 | - ? ': ' . $this->formatType($method->getReturnType(), $method) |
|
709 | + ? ': '.$this->formatType($method->getReturnType(), $method) |
|
710 | 710 | : '' |
711 | 711 | ; |
712 | 712 | } |
@@ -770,14 +770,14 @@ discard block |
||
770 | 770 | ); |
771 | 771 | } |
772 | 772 | |
773 | - if (! $type->isBuiltin()) { |
|
774 | - $name = '\\' . $name; |
|
773 | + if ( ! $type->isBuiltin()) { |
|
774 | + $name = '\\'.$name; |
|
775 | 775 | } |
776 | 776 | |
777 | 777 | if ($type->allowsNull() |
778 | 778 | && (null === $parameter || ! $parameter->isDefaultValueAvailable() || null !== $parameter->getDefaultValue()) |
779 | 779 | ) { |
780 | - $name = '?' . $name; |
|
780 | + $name = '?'.$name; |
|
781 | 781 | } |
782 | 782 | |
783 | 783 | return $name; |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | continue; |
805 | 805 | } |
806 | 806 | |
807 | - $callable = $placeholders[$tagName] ?? [$this, 'generate' . ucfirst($tagName)]; |
|
807 | + $callable = $placeholders[$tagName] ?? [$this, 'generate'.ucfirst($tagName)]; |
|
808 | 808 | |
809 | 809 | $replacements[$tag] = call_user_func($callable, $definition); |
810 | 810 | } |