@@ -10,6 +10,6 @@ |
||
10 | 10 | { |
11 | 11 | public static function fromClassNameAndField(string $className, string $field) : self |
12 | 12 | { |
13 | - return new self('Invalid order by orientation specified for ' . $className . '#' . $field); |
|
13 | + return new self('Invalid order by orientation specified for '.$className.'#'.$field); |
|
14 | 14 | } |
15 | 15 | } |
@@ -63,7 +63,7 @@ |
||
63 | 63 | 'u__status' => 'developer', |
64 | 64 | 'u__username' => 'jwage', |
65 | 65 | 'u__name' => 'Jonathan', |
66 | - 'sclr0' => 'JWAGE' . $i, |
|
66 | + 'sclr0' => 'JWAGE'.$i, |
|
67 | 67 | 'p__phonenumber' => '91', |
68 | 68 | ]; |
69 | 69 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $isInitialized = $collection->isInitialized(); |
62 | 62 | $isDirty = $collection->isDirty(); |
63 | 63 | |
64 | - if (! $isInitialized && ! $isDirty) { |
|
64 | + if ( ! $isInitialized && ! $isDirty) { |
|
65 | 65 | return; |
66 | 66 | } |
67 | 67 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->addToAssertionCount(1); |
30 | 30 | } catch (QueryException $e) { |
31 | 31 | if ($debug) { |
32 | - echo $e->getTraceAsString() . PHP_EOL; |
|
32 | + echo $e->getTraceAsString().PHP_EOL; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $this->fail($e->getMessage()); |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $this->fail('No syntax errors were detected, when syntax errors were expected'); |
45 | 45 | } catch (QueryException $e) { |
46 | 46 | if ($debug) { |
47 | - echo $e->getMessage() . PHP_EOL; |
|
48 | - echo $e->getTraceAsString() . PHP_EOL; |
|
47 | + echo $e->getMessage().PHP_EOL; |
|
48 | + echo $e->getTraceAsString().PHP_EOL; |
|
49 | 49 | } |
50 | 50 | $this->addToAssertionCount(1); |
51 | 51 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'], |
108 | 108 | |
109 | 109 | /* Checks for invalid AbstractSchemaName */ |
110 | - ['SELECT u FROM UnknownClass u'], // unknown |
|
110 | + ['SELECT u FROM UnknownClass u'], // unknown |
|
111 | 111 | ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash |
112 | 112 | ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\) |
113 | 113 | ['SELECT u FROM Unknown\Class\ u'], // unknown, syntactically bogus (trailing \) |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | */ |
574 | 574 | public function testDQLKeywordInJoinIsAllowed() : void |
575 | 575 | { |
576 | - self::assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g'); |
|
576 | + self::assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g'); |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | /** |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | */ |
582 | 582 | public function testDQLKeywordInConditionIsAllowed() : void |
583 | 583 | { |
584 | - self::assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
584 | + self::assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
585 | 585 | } |
586 | 586 | |
587 | 587 | /* The exception is currently thrown in the SQLWalker, not earlier. |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | */ |
687 | 687 | public function testNewLiteralExpression() : void |
688 | 688 | { |
689 | - self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
689 | + self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
690 | 690 | } |
691 | 691 | |
692 | 692 | /** |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | */ |
695 | 695 | public function testNewLiteralWithSubselectExpression() : void |
696 | 696 | { |
697 | - self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
697 | + self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
698 | 698 | } |
699 | 699 | |
700 | 700 | public function testStringPrimaryAcceptsAggregateExpression() : void |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $query = $this->em->createQuery( |
41 | 41 | 'SELECT CONCAT(e.type, MIN(e.version)) pair' |
42 | - . ' FROM ' . GH7286Entity::class . ' e' |
|
42 | + . ' FROM '.GH7286Entity::class.' e' |
|
43 | 43 | . ' WHERE e.type IS NOT NULL' |
44 | 44 | . ' GROUP BY e.type' |
45 | 45 | . ' ORDER BY e.type' |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | $query = $this->em->createQuery( |
65 | 65 | 'SELECT CC(e.type, MIN(e.version)) pair' |
66 | - . ' FROM ' . GH7286Entity::class . ' e' |
|
66 | + . ' FROM '.GH7286Entity::class.' e' |
|
67 | 67 | . ' WHERE e.type IS NOT NULL AND e.type != :type' |
68 | 68 | . ' GROUP BY e.type' |
69 | 69 | ); |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function enable($name) |
83 | 83 | { |
84 | - if (! $this->has($name)) { |
|
85 | - throw new InvalidArgumentException("Filter '" . $name . "' does not exist."); |
|
84 | + if ( ! $this->has($name)) { |
|
85 | + throw new InvalidArgumentException("Filter '".$name."' does not exist."); |
|
86 | 86 | } |
87 | 87 | |
88 | - if (! $this->isEnabled($name)) { |
|
88 | + if ( ! $this->isEnabled($name)) { |
|
89 | 89 | $filterClass = $this->config->getFilterClassName($name); |
90 | 90 | |
91 | 91 | $this->enabledFilters[$name] = new $filterClass($this->em); |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | */ |
134 | 134 | public function getFilter($name) |
135 | 135 | { |
136 | - if (! $this->isEnabled($name)) { |
|
137 | - throw new InvalidArgumentException("Filter '" . $name . "' is not enabled."); |
|
136 | + if ( ! $this->isEnabled($name)) { |
|
137 | + throw new InvalidArgumentException("Filter '".$name."' is not enabled."); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | return $this->enabledFilters[$name]; |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $filterHash = ''; |
188 | 188 | |
189 | 189 | foreach ($this->enabledFilters as $name => $filter) { |
190 | - $filterHash .= $name . $filter; |
|
190 | + $filterHash .= $name.$filter; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | return $filterHash; |
@@ -83,8 +83,8 @@ |
||
83 | 83 | */ |
84 | 84 | final public function getParameter($name) |
85 | 85 | { |
86 | - if (! isset($this->parameters[$name])) { |
|
87 | - throw new InvalidArgumentException("Parameter '" . $name . "' does not exist."); |
|
86 | + if ( ! isset($this->parameters[$name])) { |
|
87 | + throw new InvalidArgumentException("Parameter '".$name."' does not exist."); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | if ($property instanceof AssociationMetadata) { |
56 | 56 | throw new RuntimeException( |
57 | - 'Paginating an entity with foreign key as identifier only works when using the Output Walkers. ' . |
|
57 | + 'Paginating an entity with foreign key as identifier only works when using the Output Walkers. '. |
|
58 | 58 | 'Call Paginator#setUseOutputWalkers(true) before iterating the paginator.' |
59 | 59 | ); |
60 | 60 | } |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $AST->selectClause->selectExpressions = [new SelectExpression($pathExpression, '_dctrn_id')]; |
73 | 73 | $AST->selectClause->isDistinct = true; |
74 | 74 | |
75 | - if (! isset($AST->orderByClause)) { |
|
75 | + if ( ! isset($AST->orderByClause)) { |
|
76 | 76 | return; |
77 | 77 | } |
78 | 78 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | if ($item->expression instanceof PathExpression) { |
81 | 81 | $AST->selectClause->selectExpressions[] = new SelectExpression( |
82 | 82 | $this->createSelectExpressionItem($item->expression), |
83 | - '_dctrn_ord' . $this->aliasCounter++ |
|
83 | + '_dctrn_ord'.$this->aliasCounter++ |
|
84 | 84 | ); |
85 | 85 | |
86 | 86 | continue; |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | protected function configure() |
52 | 52 | { |
53 | 53 | $this->setName('orm:mapping:describe') |
54 | - ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity') |
|
55 | - ->setDescription('Display information about mapped objects') |
|
56 | - ->setHelp(<<<'EOT' |
|
54 | + ->addArgument('entityName', InputArgument::REQUIRED, 'Full or partial name of entity') |
|
55 | + ->setDescription('Display information about mapped objects') |
|
56 | + ->setHelp(<<<'EOT' |
|
57 | 57 | The %command.full_name% command describes the metadata for the given full or partial entity class name. |
58 | 58 | |
59 | 59 | <info>%command.full_name%</info> My\Namespace\Entity\MyEntity |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | <info>%command.full_name%</info> MyEntity |
64 | 64 | EOT |
65 | - ); |
|
65 | + ); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -139,8 +139,8 @@ discard block |
||
139 | 139 | private function getMappedEntities(EntityManagerInterface $entityManager) |
140 | 140 | { |
141 | 141 | $entityClassNames = $entityManager->getConfiguration() |
142 | - ->getMetadataDriverImpl() |
|
143 | - ->getAllClassNames(); |
|
142 | + ->getMetadataDriverImpl() |
|
143 | + ->getAllClassNames(); |
|
144 | 144 | |
145 | 145 | if (! $entityClassNames) { |
146 | 146 | throw new InvalidArgumentException( |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | ->getMetadataDriverImpl() |
145 | 145 | ->getAllClassNames(); |
146 | 146 | |
147 | - if (! $entityClassNames) { |
|
147 | + if ( ! $entityClassNames) { |
|
148 | 148 | throw new InvalidArgumentException( |
149 | - 'You do not have any mapped Doctrine ORM entities according to the current configuration. ' . |
|
149 | + 'You do not have any mapped Doctrine ORM entities according to the current configuration. '. |
|
150 | 150 | 'If you have entities or mapping files you should check your mapping configuration for errors.' |
151 | 151 | ); |
152 | 152 | } |
@@ -171,12 +171,12 @@ discard block |
||
171 | 171 | |
172 | 172 | $matches = \array_filter( |
173 | 173 | $this->getMappedEntities($entityManager), |
174 | - static function ($mappedEntity) use ($entityName) { |
|
175 | - return \preg_match('{' . \preg_quote($entityName) . '}', $mappedEntity); |
|
174 | + static function($mappedEntity) use ($entityName) { |
|
175 | + return \preg_match('{'.\preg_quote($entityName).'}', $mappedEntity); |
|
176 | 176 | } |
177 | 177 | ); |
178 | 178 | |
179 | - if (! $matches) { |
|
179 | + if ( ! $matches) { |
|
180 | 180 | throw new InvalidArgumentException(\sprintf( |
181 | 181 | 'Could not find any mapped Entity classes matching "%s"', |
182 | 182 | $entityName |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | $output[] = $this->formatField( |
230 | 230 | \sprintf(' %s', $parentClass->getParent()), |
231 | - ($parentClass->isRootEntity() ? '(Root) ' : '') . $this->formatValue($attributes) |
|
231 | + ($parentClass->isRootEntity() ? '(Root) ' : '').$this->formatValue($attributes) |
|
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | |
255 | 255 | if (\is_bool($value)) { |
256 | - return '<comment>' . ($value ? 'True' : 'False') . '</comment>'; |
|
256 | + return '<comment>'.($value ? 'True' : 'False').'</comment>'; |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | if (empty($value)) { |