Completed
Push — 2.6 ( 44e82e...1f82a2 )
by Marco
14s
created
lib/Doctrine/ORM/Query/Parser.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
         $tokenStr = substr($dql, $token['position'], $length);
487 487
 
488 488
         // Building informative message
489
-        $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message;
489
+        $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message;
490 490
 
491 491
         throw QueryException::semanticalError($message, QueryException::dqlError($this->query->getDQL()));
492 492
     }
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
             // If the namespace is not given then assumes the first FROM entity namespace
634 634
             if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) {
635 635
                 $namespace  = substr($fromClassName, 0, strrpos($fromClassName, '\\'));
636
-                $fqcn       = $namespace . '\\' . $className;
636
+                $fqcn       = $namespace.'\\'.$className;
637 637
 
638 638
                 if (class_exists($fqcn)) {
639 639
                     $expression->className  = $fqcn;
@@ -685,13 +685,13 @@  discard block
 block discarded – undo
685 685
                 }
686 686
 
687 687
                 $this->semanticalError(
688
-                    "There is no mapped field named '$field' on class " . $class->name . ".", $deferredItem['token']
688
+                    "There is no mapped field named '$field' on class ".$class->name.".", $deferredItem['token']
689 689
                 );
690 690
             }
691 691
 
692 692
             if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) {
693 693
                 $this->semanticalError(
694
-                    "The partial field selection of class " . $class->name . " must contain the identifier.",
694
+                    "The partial field selection of class ".$class->name." must contain the identifier.",
695 695
                     $deferredItem['token']
696 696
                 );
697 697
             }
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
             // Check if field or association exists
761 761
             if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) {
762 762
                 $this->semanticalError(
763
-                    'Class ' . $class->name . ' has no field or association named ' . $field,
763
+                    'Class '.$class->name.' has no field or association named '.$field,
764 764
                     $deferredItem['token']
765 765
                 );
766 766
             }
@@ -800,8 +800,8 @@  discard block
 block discarded – undo
800 800
                 // Build the error message
801 801
                 $semanticalError  = 'Invalid PathExpression. ';
802 802
                 $semanticalError .= (count($expectedStringTypes) == 1)
803
-                    ? 'Must be a ' . $expectedStringTypes[0] . '.'
804
-                    : implode(' or ', $expectedStringTypes) . ' expected.';
803
+                    ? 'Must be a '.$expectedStringTypes[0].'.'
804
+                    : implode(' or ', $expectedStringTypes).' expected.';
805 805
 
806 806
                 $this->semanticalError($semanticalError, $deferredItem['token']);
807 807
             }
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
 
976 976
         [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']);
977 977
 
978
-        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
978
+        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
979 979
     }
980 980
 
981 981
     /**
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
      */
988 988
     private function validateAbstractSchemaName($schemaName)
989 989
     {
990
-        if (! (class_exists($schemaName, true) || interface_exists($schemaName, true))) {
990
+        if ( ! (class_exists($schemaName, true) || interface_exists($schemaName, true))) {
991 991
             $this->semanticalError("Class '$schemaName' is not defined.", $this->lexer->token);
992 992
         }
993 993
     }
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
 
1044 1044
         if ( ! isset($this->queryComponents[$identVariable])) {
1045 1045
             $this->semanticalError(
1046
-                'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.'
1046
+                'Identification Variable '.$identVariable.' used in join path expression but was not defined before.'
1047 1047
             );
1048 1048
         }
1049 1049
 
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
         $class = $qComp['metadata'];
1058 1058
 
1059 1059
         if ( ! $class->hasAssociation($field)) {
1060
-            $this->semanticalError('Class ' . $class->name . ' has no association named ' . $field);
1060
+            $this->semanticalError('Class '.$class->name.' has no association named '.$field);
1061 1061
         }
1062 1062
 
1063 1063
         return new AST\JoinAssociationPathExpression($identVariable, $field);
@@ -2485,7 +2485,7 @@  discard block
 block discarded – undo
2485 2485
         // Peek beyond the matching closing parenthesis ')'
2486 2486
         $peek = $this->peekBeyondClosingParenthesis();
2487 2487
 
2488
-        if (in_array($peek['value'], ["=",  "<", "<=", "<>", ">", ">=", "!="]) ||
2488
+        if (in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) ||
2489 2489
             in_array($peek['type'], [Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS]) ||
2490 2490
             $this->isMathOperator($peek)) {
2491 2491
             $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression();
@@ -2590,7 +2590,7 @@  discard block
 block discarded – undo
2590 2590
             return $this->NullComparisonExpression();
2591 2591
         }
2592 2592
 
2593
-        if ($token['type'] === Lexer::T_IS  && $lookahead['type'] === Lexer::T_EMPTY) {
2593
+        if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) {
2594 2594
             return $this->EmptyCollectionComparisonExpression();
2595 2595
         }
2596 2596
 
Please login to merge, or discard this patch.