@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public static function scheduleInsertForManagedEntity($entity) |
32 | 32 | { |
33 | - return new self('A managed+dirty entity ' . self::objToStr($entity) . ' can not be scheduled for insertion.'); |
|
33 | + return new self('A managed+dirty entity '.self::objToStr($entity).' can not be scheduled for insertion.'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public static function scheduleInsertForRemovedEntity($entity) |
42 | 42 | { |
43 | - return new self('Removed entity ' . self::objToStr($entity) . ' can not be scheduled for insertion.'); |
|
43 | + return new self('Removed entity '.self::objToStr($entity).' can not be scheduled for insertion.'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public static function scheduleInsertTwice($entity) |
52 | 52 | { |
53 | - return new self('Entity ' . self::objToStr($entity) . ' can not be scheduled for insertion twice.'); |
|
53 | + return new self('Entity '.self::objToStr($entity).' can not be scheduled for insertion twice.'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public static function entityWithoutIdentity($className, $entity) |
63 | 63 | { |
64 | 64 | return new self( |
65 | - "The given entity of type '" . $className . "' (" . self::objToStr($entity) . ') has no identity/no ' . |
|
65 | + "The given entity of type '".$className."' (".self::objToStr($entity).') has no identity/no '. |
|
66 | 66 | 'id values set. It cannot be added to the identity map.' |
67 | 67 | ); |
68 | 68 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public static function readOnlyRequiresManagedEntity($entity) |
76 | 76 | { |
77 | - return new self('Only managed entities can be marked or checked as read only. But ' . self::objToStr($entity) . ' is not'); |
|
77 | + return new self('Only managed entities can be marked or checked as read only. But '.self::objToStr($entity).' is not'); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | public static function newEntitiesFoundThroughRelationships($newEntitiesWithAssociations) |
86 | 86 | { |
87 | 87 | $errorMessages = array_map( |
88 | - static function (array $newEntityWithAssociation) : string { |
|
88 | + static function(array $newEntityWithAssociation) : string { |
|
89 | 89 | [$associationMetadata, $entity] = $newEntityWithAssociation; |
90 | 90 | |
91 | 91 | return self::newEntityFoundThroughRelationshipMessage($associationMetadata, $entity); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | */ |
155 | 155 | public static function entityNotManaged($entity) |
156 | 156 | { |
157 | - return new self('Entity ' . self::objToStr($entity) . ' is not managed. An entity is managed if its fetched ' . |
|
157 | + return new self('Entity '.self::objToStr($entity).' is not managed. An entity is managed if its fetched '. |
|
158 | 158 | 'from the database or registered as new through EntityManager#persist'); |
159 | 159 | } |
160 | 160 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public static function entityHasNoIdentity($entity, $operation) |
168 | 168 | { |
169 | - return new self('Entity has no identity, therefore ' . $operation . ' cannot be performed. ' . self::objToStr($entity)); |
|
169 | + return new self('Entity has no identity, therefore '.$operation.' cannot be performed. '.self::objToStr($entity)); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | /** |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | public static function entityIsRemoved($entity, $operation) |
179 | 179 | { |
180 | - return new self('Entity is removed, therefore ' . $operation . ' cannot be performed. ' . self::objToStr($entity)); |
|
180 | + return new self('Entity is removed, therefore '.$operation.' cannot be performed. '.self::objToStr($entity)); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public static function detachedEntityCannot($entity, $operation) |
190 | 190 | { |
191 | - return new self('Detached entity ' . self::objToStr($entity) . ' cannot be ' . $operation); |
|
191 | + return new self('Detached entity '.self::objToStr($entity).' cannot be '.$operation); |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | /** |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public static function invalidObject($context, $given, $parameterIndex = 1) |
202 | 202 | { |
203 | - return new self($context . ' expects parameter ' . $parameterIndex . |
|
204 | - ' to be an entity object, ' . gettype($given) . ' given.'); |
|
203 | + return new self($context.' expects parameter '.$parameterIndex. |
|
204 | + ' to be an entity object, '.gettype($given).' given.'); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public static function invalidCompositeIdentifier() |
211 | 211 | { |
212 | - return new self('Binding an entity with a composite primary key to a query is not supported. ' . |
|
212 | + return new self('Binding an entity with a composite primary key to a query is not supported. '. |
|
213 | 213 | 'You should split the parameter into the explicit fields and bind them separately.'); |
214 | 214 | } |
215 | 215 | |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | */ |
247 | 247 | private static function objToStr($obj) : string |
248 | 248 | { |
249 | - return method_exists($obj, '__toString') ? (string) $obj : get_class($obj) . '@' . spl_object_id($obj); |
|
249 | + return method_exists($obj, '__toString') ? (string) $obj : get_class($obj).'@'.spl_object_id($obj); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | /** |
@@ -255,15 +255,15 @@ discard block |
||
255 | 255 | private static function newEntityFoundThroughRelationshipMessage(AssociationMetadata $association, $entity) : string |
256 | 256 | { |
257 | 257 | return 'A new entity was found through the relationship \'' |
258 | - . $association->getSourceEntity() . '#' . $association->getName() . '\' that was not' |
|
259 | - . ' configured to cascade persist operations for entity: ' . self::objToStr($entity) . '.' |
|
258 | + . $association->getSourceEntity().'#'.$association->getName().'\' that was not' |
|
259 | + . ' configured to cascade persist operations for entity: '.self::objToStr($entity).'.' |
|
260 | 260 | . ' To solve this issue: Either explicitly call EntityManager#persist()' |
261 | 261 | . ' on this unknown entity or configure cascade persist' |
262 | 262 | . ' this association in the mapping for example @ManyToOne(..,cascade={"persist"}).' |
263 | 263 | . (method_exists($entity, '__toString') |
264 | 264 | ? '' |
265 | 265 | : ' If you cannot find out which entity causes the problem implement \'' |
266 | - . $association->getTargetEntity() . '#__toString()\' to get a clue.' |
|
266 | + . $association->getTargetEntity().'#__toString()\' to get a clue.' |
|
267 | 267 | ); |
268 | 268 | } |
269 | 269 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | // remove namespace separators from remaining class name |
47 | 47 | $fileName = str_replace('\\', '', $classNameRelativeToMetadataNamespace); |
48 | 48 | |
49 | - return $metadataDir . DIRECTORY_SEPARATOR . $fileName . '.php'; |
|
49 | + return $metadataDir.DIRECTORY_SEPARATOR.$fileName.'.php'; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ) : Closure { |
64 | 64 | $metadataNamespace = ltrim($metadataNamespace, '\\'); |
65 | 65 | |
66 | - if (! ($notFoundCallback === null || is_callable($notFoundCallback))) { |
|
66 | + if ( ! ($notFoundCallback === null || is_callable($notFoundCallback))) { |
|
67 | 67 | $type = is_object($notFoundCallback) ? get_class($notFoundCallback) : gettype($notFoundCallback); |
68 | 68 | |
69 | 69 | throw new InvalidArgumentException( |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ); |
72 | 72 | } |
73 | 73 | |
74 | - $autoloader = static function ($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) { |
|
74 | + $autoloader = static function($className) use ($metadataDir, $metadataNamespace, $notFoundCallback) { |
|
75 | 75 | if (strpos($className, $metadataNamespace) === 0) { |
76 | 76 | $file = Autoloader::resolveFile($metadataDir, $metadataNamespace, $className); |
77 | 77 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $this->ensureDirectoryIsReady(dirname($filePath)); |
38 | 38 | |
39 | - $tmpFileName = $filePath . '.' . uniqid('', true); |
|
39 | + $tmpFileName = $filePath.'.'.uniqid('', true); |
|
40 | 40 | |
41 | 41 | file_put_contents($tmpFileName, $sourceCode); |
42 | 42 | @chmod($tmpFileName, 0664); |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | */ |
51 | 51 | private function ensureDirectoryIsReady(string $directory) |
52 | 52 | { |
53 | - if (! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) { |
|
53 | + if ( ! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) { |
|
54 | 54 | throw new RuntimeException(sprintf('Your metadata directory "%s" must be writable', $directory)); |
55 | 55 | } |
56 | 56 | |
57 | - if (! is_writable($directory)) { |
|
57 | + if ( ! is_writable($directory)) { |
|
58 | 58 | throw new RuntimeException(sprintf('Your proxy directory "%s" must be writable', $directory)); |
59 | 59 | } |
60 | 60 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function register($object) |
44 | 44 | { |
45 | - if (! is_object($object)) { |
|
45 | + if ( ! is_object($object)) { |
|
46 | 46 | throw new InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object))); |
47 | 47 | } |
48 | 48 |
@@ -24,30 +24,30 @@ |
||
24 | 24 | */ |
25 | 25 | public function export($value, int $indentationLevel = 0) : string |
26 | 26 | { |
27 | - if (! is_array($value)) { |
|
27 | + if ( ! is_array($value)) { |
|
28 | 28 | return var_export($value, true); |
29 | 29 | } |
30 | 30 | |
31 | 31 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
32 | - $longestKey = array_reduce(array_keys($value), static function ($k, $v) { |
|
32 | + $longestKey = array_reduce(array_keys($value), static function($k, $v) { |
|
33 | 33 | return (string) (strlen((string) $k) > strlen((string) $v) ? $k : $v); |
34 | 34 | }); |
35 | 35 | $maxKeyLength = strlen($longestKey) + (is_numeric($longestKey) ? 0 : 2); |
36 | 36 | |
37 | 37 | $lines = []; |
38 | 38 | |
39 | - $lines[] = $indentation . '['; |
|
39 | + $lines[] = $indentation.'['; |
|
40 | 40 | |
41 | 41 | foreach ($value as $entryKey => $entryValue) { |
42 | 42 | $lines[] = sprintf( |
43 | 43 | '%s%s => %s,', |
44 | - $indentation . self::INDENTATION, |
|
44 | + $indentation.self::INDENTATION, |
|
45 | 45 | str_pad(var_export($entryKey, true), $maxKeyLength), |
46 | 46 | ltrim($this->export($entryValue, $indentationLevel + 1)) |
47 | 47 | ); |
48 | 48 | } |
49 | 49 | |
50 | - $lines[] = $indentation . ']'; |
|
50 | + $lines[] = $indentation.']'; |
|
51 | 51 | |
52 | 52 | return implode(PHP_EOL, $lines); |
53 | 53 | } |
@@ -74,13 +74,13 @@ |
||
74 | 74 | |
75 | 75 | switch ($expr->getType()) { |
76 | 76 | case CompositeExpression::TYPE_AND: |
77 | - return '(' . implode(' AND ', $expressionList) . ')'; |
|
77 | + return '('.implode(' AND ', $expressionList).')'; |
|
78 | 78 | |
79 | 79 | case CompositeExpression::TYPE_OR: |
80 | - return '(' . implode(' OR ', $expressionList) . ')'; |
|
80 | + return '('.implode(' OR ', $expressionList).')'; |
|
81 | 81 | |
82 | 82 | default: |
83 | - throw new RuntimeException('Unknown composite ' . $expr->getType()); |
|
83 | + throw new RuntimeException('Unknown composite '.$expr->getType()); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 |
@@ -162,7 +162,7 @@ |
||
162 | 162 | |
163 | 163 | // Recognize identifiers, aliased or qualified names |
164 | 164 | case ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\': |
165 | - $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); |
|
165 | + $name = 'Doctrine\ORM\Query\Lexer::T_'.strtoupper($value); |
|
166 | 166 | |
167 | 167 | if (defined($name)) { |
168 | 168 | $type = constant($name); |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function add($arg) |
65 | 65 | { |
66 | - if ($arg !== null && (! $arg instanceof self || $arg->count() > 0)) { |
|
66 | + if ($arg !== null && ( ! $arg instanceof self || $arg->count() > 0)) { |
|
67 | 67 | // If we decide to keep Expr\Base instances, we can use this check |
68 | - if (! is_string($arg)) { |
|
68 | + if ( ! is_string($arg)) { |
|
69 | 69 | $class = get_class($arg); |
70 | 70 | |
71 | - if (! in_array($class, $this->allowedClasses, true)) { |
|
71 | + if ( ! in_array($class, $this->allowedClasses, true)) { |
|
72 | 72 | throw new InvalidArgumentException( |
73 | 73 | sprintf("Expression of type '%s' not allowed in this context.", $class) |
74 | 74 | ); |
@@ -98,6 +98,6 @@ discard block |
||
98 | 98 | return (string) $this->parts[0]; |
99 | 99 | } |
100 | 100 | |
101 | - return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; |
|
101 | + return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator; |
|
102 | 102 | } |
103 | 103 | } |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | } |
398 | 398 | |
399 | 399 | foreach ($this->queryComponents as $dqlAlias => $qComp) { |
400 | - if (! isset($this->identVariableExpressions[$dqlAlias])) { |
|
400 | + if ( ! isset($this->identVariableExpressions[$dqlAlias])) { |
|
401 | 401 | continue; |
402 | 402 | } |
403 | 403 | |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | $tokenStr = substr($dql, (int) $token['position'], $length); |
462 | 462 | |
463 | 463 | // Building informative message |
464 | - $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; |
|
464 | + $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message; |
|
465 | 465 | |
466 | 466 | throw QueryException::semanticalError( |
467 | 467 | $message, |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | $identVariable = $deferredItem['expression']; |
565 | 565 | |
566 | 566 | // Check if IdentificationVariable exists in queryComponents |
567 | - if (! isset($this->queryComponents[$identVariable])) { |
|
567 | + if ( ! isset($this->queryComponents[$identVariable])) { |
|
568 | 568 | $this->semanticalError( |
569 | 569 | sprintf("'%s' is not defined.", $identVariable), |
570 | 570 | $deferredItem['token'] |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | $qComp = $this->queryComponents[$identVariable]; |
575 | 575 | |
576 | 576 | // Check if queryComponent points to an AbstractSchemaName or a ResultVariable |
577 | - if (! isset($qComp['metadata'])) { |
|
577 | + if ( ! isset($qComp['metadata'])) { |
|
578 | 578 | $this->semanticalError( |
579 | 579 | sprintf("'%s' does not point to a Class.", $identVariable), |
580 | 580 | $deferredItem['token'] |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | // If the namespace is not given then assumes the first FROM entity namespace |
609 | 609 | if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { |
610 | 610 | $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\')); |
611 | - $fqcn = $namespace . '\\' . $className; |
|
611 | + $fqcn = $namespace.'\\'.$className; |
|
612 | 612 | |
613 | 613 | if (class_exists($fqcn)) { |
614 | 614 | $expression->className = $fqcn; |
@@ -616,13 +616,13 @@ discard block |
||
616 | 616 | } |
617 | 617 | } |
618 | 618 | |
619 | - if (! class_exists($className)) { |
|
619 | + if ( ! class_exists($className)) { |
|
620 | 620 | $this->semanticalError(sprintf('Class "%s" is not defined.', $className), $token); |
621 | 621 | } |
622 | 622 | |
623 | 623 | $class = new ReflectionClass($className); |
624 | 624 | |
625 | - if (! $class->isInstantiable()) { |
|
625 | + if ( ! $class->isInstantiable()) { |
|
626 | 626 | $this->semanticalError(sprintf('Class "%s" can not be instantiated.', $className), $token); |
627 | 627 | } |
628 | 628 | |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | $resultVariable = $deferredItem['expression']; |
680 | 680 | |
681 | 681 | // Check if ResultVariable exists in queryComponents |
682 | - if (! isset($this->queryComponents[$resultVariable])) { |
|
682 | + if ( ! isset($this->queryComponents[$resultVariable])) { |
|
683 | 683 | $this->semanticalError( |
684 | 684 | sprintf("'%s' is not defined.", $resultVariable), |
685 | 685 | $deferredItem['token'] |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | $qComp = $this->queryComponents[$resultVariable]; |
690 | 690 | |
691 | 691 | // Check if queryComponent points to an AbstractSchemaName or a ResultVariable |
692 | - if (! isset($qComp['resultVariable'])) { |
|
692 | + if ( ! isset($qComp['resultVariable'])) { |
|
693 | 693 | $this->semanticalError( |
694 | 694 | sprintf("'%s' does not point to a ResultVariable.", $resultVariable), |
695 | 695 | $deferredItem['token'] |
@@ -731,9 +731,9 @@ discard block |
||
731 | 731 | $property = $class->getProperty($field); |
732 | 732 | |
733 | 733 | // Check if field or association exists |
734 | - if (! $property) { |
|
734 | + if ( ! $property) { |
|
735 | 735 | $this->semanticalError( |
736 | - 'Class ' . $class->getClassName() . ' has no field or association named ' . $field, |
|
736 | + 'Class '.$class->getClassName().' has no field or association named '.$field, |
|
737 | 737 | $deferredItem['token'] |
738 | 738 | ); |
739 | 739 | } |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | // Validate if PathExpression is one of the expected types |
750 | 750 | $expectedType = $pathExpression->expectedType; |
751 | 751 | |
752 | - if (! ($expectedType & $fieldType)) { |
|
752 | + if ( ! ($expectedType & $fieldType)) { |
|
753 | 753 | // We need to recognize which was expected type(s) |
754 | 754 | $expectedStringTypes = []; |
755 | 755 | |
@@ -771,8 +771,8 @@ discard block |
||
771 | 771 | // Build the error message |
772 | 772 | $semanticalError = 'Invalid PathExpression. '; |
773 | 773 | $semanticalError .= count($expectedStringTypes) === 1 |
774 | - ? 'Must be a ' . $expectedStringTypes[0] . '.' |
|
775 | - : implode(' or ', $expectedStringTypes) . ' expected.'; |
|
774 | + ? 'Must be a '.$expectedStringTypes[0].'.' |
|
775 | + : implode(' or ', $expectedStringTypes).' expected.'; |
|
776 | 776 | |
777 | 777 | $this->semanticalError($semanticalError, $deferredItem['token']); |
778 | 778 | } |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | |
785 | 785 | private function processRootEntityAliasSelected() |
786 | 786 | { |
787 | - if (! $this->identVariableExpressions) { |
|
787 | + if ( ! $this->identVariableExpressions) { |
|
788 | 788 | return; |
789 | 789 | } |
790 | 790 | |
@@ -941,7 +941,7 @@ discard block |
||
941 | 941 | |
942 | 942 | [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']); |
943 | 943 | |
944 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
944 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
945 | 945 | } |
946 | 946 | |
947 | 947 | /** |
@@ -1020,9 +1020,9 @@ discard block |
||
1020 | 1020 | { |
1021 | 1021 | $identVariable = $this->IdentificationVariable(); |
1022 | 1022 | |
1023 | - if (! isset($this->queryComponents[$identVariable])) { |
|
1023 | + if ( ! isset($this->queryComponents[$identVariable])) { |
|
1024 | 1024 | $this->semanticalError( |
1025 | - 'Identification Variable ' . $identVariable . ' used in join path expression but was not defined before.' |
|
1025 | + 'Identification Variable '.$identVariable.' used in join path expression but was not defined before.' |
|
1026 | 1026 | ); |
1027 | 1027 | } |
1028 | 1028 | |
@@ -1036,8 +1036,8 @@ discard block |
||
1036 | 1036 | $class = $qComp['metadata']; |
1037 | 1037 | $property = $class->getProperty($field); |
1038 | 1038 | |
1039 | - if (! ($property !== null && $property instanceof AssociationMetadata)) { |
|
1040 | - $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field); |
|
1039 | + if ( ! ($property !== null && $property instanceof AssociationMetadata)) { |
|
1040 | + $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field); |
|
1041 | 1041 | } |
1042 | 1042 | |
1043 | 1043 | return new AST\JoinAssociationPathExpression($identVariable, $field); |
@@ -1067,7 +1067,7 @@ discard block |
||
1067 | 1067 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1068 | 1068 | $this->match(Lexer::T_DOT); |
1069 | 1069 | $this->match(Lexer::T_IDENTIFIER); |
1070 | - $field .= '.' . $this->lexer->token['value']; |
|
1070 | + $field .= '.'.$this->lexer->token['value']; |
|
1071 | 1071 | } |
1072 | 1072 | } |
1073 | 1073 | |
@@ -1449,7 +1449,7 @@ discard block |
||
1449 | 1449 | // Still need to decide between IdentificationVariable or ResultVariable |
1450 | 1450 | $lookaheadValue = $this->lexer->lookahead['value']; |
1451 | 1451 | |
1452 | - if (! isset($this->queryComponents[$lookaheadValue])) { |
|
1452 | + if ( ! isset($this->queryComponents[$lookaheadValue])) { |
|
1453 | 1453 | $this->semanticalError('Cannot group by undefined identification or result variable.'); |
1454 | 1454 | } |
1455 | 1455 | |
@@ -1797,7 +1797,7 @@ discard block |
||
1797 | 1797 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1798 | 1798 | $this->match(Lexer::T_DOT); |
1799 | 1799 | $this->match(Lexer::T_IDENTIFIER); |
1800 | - $field .= '.' . $this->lexer->token['value']; |
|
1800 | + $field .= '.'.$this->lexer->token['value']; |
|
1801 | 1801 | } |
1802 | 1802 | |
1803 | 1803 | $partialFieldSet[] = $field; |
@@ -1811,7 +1811,7 @@ discard block |
||
1811 | 1811 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1812 | 1812 | $this->match(Lexer::T_DOT); |
1813 | 1813 | $this->match(Lexer::T_IDENTIFIER); |
1814 | - $field .= '.' . $this->lexer->token['value']; |
|
1814 | + $field .= '.'.$this->lexer->token['value']; |
|
1815 | 1815 | } |
1816 | 1816 | |
1817 | 1817 | $partialFieldSet[] = $field; |
@@ -2432,7 +2432,7 @@ discard block |
||
2432 | 2432 | |
2433 | 2433 | // Phase 1 AST optimization: Prevent AST\ConditionalFactor |
2434 | 2434 | // if only one AST\ConditionalPrimary is defined |
2435 | - if (! $not) { |
|
2435 | + if ( ! $not) { |
|
2436 | 2436 | return $conditionalPrimary; |
2437 | 2437 | } |
2438 | 2438 | |
@@ -2451,7 +2451,7 @@ discard block |
||
2451 | 2451 | { |
2452 | 2452 | $condPrimary = new AST\ConditionalPrimary(); |
2453 | 2453 | |
2454 | - if (! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { |
|
2454 | + if ( ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { |
|
2455 | 2455 | $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression(); |
2456 | 2456 | |
2457 | 2457 | return $condPrimary; |
@@ -2619,7 +2619,7 @@ discard block |
||
2619 | 2619 | $this->match(Lexer::T_OF); |
2620 | 2620 | } |
2621 | 2621 | |
2622 | - $collMemberExpr = new AST\CollectionMemberExpression( |
|
2622 | + $collMemberExpr = new AST\CollectionMemberExpression( |
|
2623 | 2623 | $entityExpr, |
2624 | 2624 | $this->CollectionValuedPathExpression() |
2625 | 2625 | ); |
@@ -2958,7 +2958,7 @@ discard block |
||
2958 | 2958 | $lookaheadType = $this->lexer->lookahead['type']; |
2959 | 2959 | $isDistinct = false; |
2960 | 2960 | |
2961 | - if (! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) { |
|
2961 | + if ( ! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) { |
|
2962 | 2962 | $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT'); |
2963 | 2963 | } |
2964 | 2964 | |
@@ -2988,7 +2988,7 @@ discard block |
||
2988 | 2988 | $lookaheadType = $this->lexer->lookahead['type']; |
2989 | 2989 | $value = $this->lexer->lookahead['value']; |
2990 | 2990 | |
2991 | - if (! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) { |
|
2991 | + if ( ! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) { |
|
2992 | 2992 | $this->syntaxError('ALL, ANY or SOME'); |
2993 | 2993 | } |
2994 | 2994 | |
@@ -3226,7 +3226,7 @@ discard block |
||
3226 | 3226 | $lookaheadValue = $this->lexer->lookahead['value']; |
3227 | 3227 | |
3228 | 3228 | // Validate existing component |
3229 | - if (! isset($this->queryComponents[$lookaheadValue])) { |
|
3229 | + if ( ! isset($this->queryComponents[$lookaheadValue])) { |
|
3230 | 3230 | $this->semanticalError('Cannot add having condition on undefined result variable.'); |
3231 | 3231 | } |
3232 | 3232 | |
@@ -3237,7 +3237,7 @@ discard block |
||
3237 | 3237 | } |
3238 | 3238 | |
3239 | 3239 | // Validating ResultVariable |
3240 | - if (! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) { |
|
3240 | + if ( ! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) { |
|
3241 | 3241 | $this->semanticalError('Cannot add having condition on a non result variable.'); |
3242 | 3242 | } |
3243 | 3243 |