@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function startProduction($name) |
47 | 47 | { |
48 | - $this->println('(' . $name); |
|
48 | + $this->println('('.$name); |
|
49 | 49 | $this->indent++; |
50 | 50 | } |
51 | 51 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function println($str) |
69 | 69 | { |
70 | - if (! $this->silent) { |
|
70 | + if ( ! $this->silent) { |
|
71 | 71 | echo \str_repeat(' ', $this->indent), $str, "\n"; |
72 | 72 | } |
73 | 73 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function countDistinct($x) |
255 | 255 | { |
256 | - return 'COUNT(DISTINCT ' . \implode(', ', \func_get_args()) . ')'; |
|
256 | + return 'COUNT(DISTINCT '.\implode(', ', \func_get_args()).')'; |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | /** |
@@ -429,13 +429,13 @@ discard block |
||
429 | 429 | { |
430 | 430 | if (\is_array($y)) { |
431 | 431 | foreach ($y as &$literal) { |
432 | - if (! ($literal instanceof Expr\Literal)) { |
|
432 | + if ( ! ($literal instanceof Expr\Literal)) { |
|
433 | 433 | $literal = $this->quoteLiteral($literal); |
434 | 434 | } |
435 | 435 | } |
436 | 436 | } |
437 | 437 | |
438 | - return new Expr\Func($x . ' IN', (array) $y); |
|
438 | + return new Expr\Func($x.' IN', (array) $y); |
|
439 | 439 | } |
440 | 440 | |
441 | 441 | /** |
@@ -450,13 +450,13 @@ discard block |
||
450 | 450 | { |
451 | 451 | if (\is_array($y)) { |
452 | 452 | foreach ($y as &$literal) { |
453 | - if (! ($literal instanceof Expr\Literal)) { |
|
453 | + if ( ! ($literal instanceof Expr\Literal)) { |
|
454 | 454 | $literal = $this->quoteLiteral($literal); |
455 | 455 | } |
456 | 456 | } |
457 | 457 | } |
458 | 458 | |
459 | - return new Expr\Func($x . ' NOT IN', (array) $y); |
|
459 | + return new Expr\Func($x.' NOT IN', (array) $y); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | */ |
469 | 469 | public function isNull($x) |
470 | 470 | { |
471 | - return $x . ' IS NULL'; |
|
471 | + return $x.' IS NULL'; |
|
472 | 472 | } |
473 | 473 | |
474 | 474 | /** |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | */ |
481 | 481 | public function isNotNull($x) |
482 | 482 | { |
483 | - return $x . ' IS NOT NULL'; |
|
483 | + return $x.' IS NOT NULL'; |
|
484 | 484 | } |
485 | 485 | |
486 | 486 | /** |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | return $literal ? 'true' : 'false'; |
605 | 605 | } |
606 | 606 | |
607 | - return "'" . \str_replace("'", "''", $literal) . "'"; |
|
607 | + return "'".\str_replace("'", "''", $literal)."'"; |
|
608 | 608 | } |
609 | 609 | |
610 | 610 | /** |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | */ |
619 | 619 | public function between($val, $x, $y) |
620 | 620 | { |
621 | - return $val . ' BETWEEN ' . $x . ' AND ' . $y; |
|
621 | + return $val.' BETWEEN '.$x.' AND '.$y; |
|
622 | 622 | } |
623 | 623 | |
624 | 624 | /** |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | foreach ($props as $name => $prop) { |
61 | 61 | $ident += 4; |
62 | 62 | $str .= \str_repeat(' ', $ident) . '"' . $name . '": ' |
63 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
63 | + . $this->dump($prop) . ',' . PHP_EOL; |
|
64 | 64 | $ident -= 4; |
65 | 65 | } |
66 | 66 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | foreach ($obj as $k => $v) { |
74 | 74 | $str .= PHP_EOL . \str_repeat(' ', $ident) . '"' |
75 | - . $k . '" => ' . $this->dump($v) . ','; |
|
75 | + . $k . '" => ' . $this->dump($v) . ','; |
|
76 | 76 | $some = true; |
77 | 77 | } |
78 | 78 |
@@ -54,32 +54,32 @@ |
||
54 | 54 | $str = ''; |
55 | 55 | |
56 | 56 | if ($obj instanceof Node) { |
57 | - $str .= \get_class($obj) . '(' . PHP_EOL; |
|
57 | + $str .= \get_class($obj).'('.PHP_EOL; |
|
58 | 58 | $props = \get_object_vars($obj); |
59 | 59 | |
60 | 60 | foreach ($props as $name => $prop) { |
61 | 61 | $ident += 4; |
62 | - $str .= \str_repeat(' ', $ident) . '"' . $name . '": ' |
|
63 | - . $this->dump($prop) . ',' . PHP_EOL; |
|
62 | + $str .= \str_repeat(' ', $ident).'"'.$name.'": ' |
|
63 | + . $this->dump($prop).','.PHP_EOL; |
|
64 | 64 | $ident -= 4; |
65 | 65 | } |
66 | 66 | |
67 | - $str .= \str_repeat(' ', $ident) . ')'; |
|
67 | + $str .= \str_repeat(' ', $ident).')'; |
|
68 | 68 | } elseif (\is_array($obj)) { |
69 | 69 | $ident += 4; |
70 | 70 | $str .= 'array('; |
71 | 71 | $some = false; |
72 | 72 | |
73 | 73 | foreach ($obj as $k => $v) { |
74 | - $str .= PHP_EOL . \str_repeat(' ', $ident) . '"' |
|
75 | - . $k . '" => ' . $this->dump($v) . ','; |
|
74 | + $str .= PHP_EOL.\str_repeat(' ', $ident).'"' |
|
75 | + . $k.'" => '.$this->dump($v).','; |
|
76 | 76 | $some = true; |
77 | 77 | } |
78 | 78 | |
79 | 79 | $ident -= 4; |
80 | - $str .= ($some ? PHP_EOL . \str_repeat(' ', $ident) : '') . ')'; |
|
80 | + $str .= ($some ? PHP_EOL . \str_repeat(' ', $ident) : '').')'; |
|
81 | 81 | } elseif (\is_object($obj)) { |
82 | - $str .= 'instanceof(' . \get_class($obj) . ')'; |
|
82 | + $str .= 'instanceof('.\get_class($obj).')'; |
|
83 | 83 | } else { |
84 | 84 | $str .= \var_export($obj, true); |
85 | 85 | } |
@@ -19,6 +19,6 @@ |
||
19 | 19 | */ |
20 | 20 | public static function noDispatchForNode($node) |
21 | 21 | { |
22 | - return new self('Double-dispatch for node ' . \get_class($node) . ' is not supported.'); |
|
22 | + return new self('Double-dispatch for node '.\get_class($node).' is not supported.'); |
|
23 | 23 | } |
24 | 24 | } |
@@ -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); |
@@ -41,12 +41,12 @@ |
||
41 | 41 | $queryPart = (string) $part; |
42 | 42 | |
43 | 43 | if (\is_object($part) && $part instanceof self && $part->count() > 1) { |
44 | - return $this->preSeparator . $queryPart . $this->postSeparator; |
|
44 | + return $this->preSeparator.$queryPart.$this->postSeparator; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | // Fixes DDC-1237: User may have added a where item containing nested expression (with "OR" or "AND") |
48 | 48 | if (\stripos($queryPart, ' OR ') !== false || \stripos($queryPart, ' AND ') !== false) { |
49 | - return $this->preSeparator . $queryPart . $this->postSeparator; |
|
49 | + return $this->preSeparator.$queryPart.$this->postSeparator; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | return $queryPart; |
@@ -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 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function add($sort, $order = null) |
46 | 46 | { |
47 | 47 | $order = ! $order ? 'ASC' : $order; |
48 | - $this->parts[] = $sort . ' ' . $order; |
|
48 | + $this->parts[] = $sort.' '.$order; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -69,6 +69,6 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function __toString() |
71 | 71 | { |
72 | - return $this->preSeparator . \implode($this->separator, $this->parts) . $this->postSeparator; |
|
72 | + return $this->preSeparator.\implode($this->separator, $this->parts).$this->postSeparator; |
|
73 | 73 | } |
74 | 74 | } |
@@ -107,8 +107,8 @@ |
||
107 | 107 | public function __toString() |
108 | 108 | { |
109 | 109 | return \strtoupper($this->joinType) . ' JOIN ' . $this->join |
110 | - . ($this->alias ? ' ' . $this->alias : '') |
|
111 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
112 | - . ($this->condition ? ' ' . \strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
110 | + . ($this->alias ? ' ' . $this->alias : '') |
|
111 | + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
112 | + . ($this->condition ? ' ' . \strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
113 | 113 | } |
114 | 114 | } |
@@ -106,9 +106,9 @@ |
||
106 | 106 | */ |
107 | 107 | public function __toString() |
108 | 108 | { |
109 | - return \strtoupper($this->joinType) . ' JOIN ' . $this->join |
|
110 | - . ($this->alias ? ' ' . $this->alias : '') |
|
111 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
112 | - . ($this->condition ? ' ' . \strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
109 | + return \strtoupper($this->joinType).' JOIN '.$this->join |
|
110 | + . ($this->alias ? ' '.$this->alias : '') |
|
111 | + . ($this->indexBy ? ' INDEX BY '.$this->indexBy : '') |
|
112 | + . ($this->condition ? ' '.\strtoupper($this->conditionType).' '.$this->condition : ''); |
|
113 | 113 | } |
114 | 114 | } |