@@ -92,16 +92,16 @@ |
||
92 | 92 | $leftExpr = (string) $this->leftExpr; |
93 | 93 | |
94 | 94 | if ($this->leftExpr instanceof Math) { |
95 | - $leftExpr = '(' . $leftExpr . ')'; |
|
95 | + $leftExpr = '('.$leftExpr.')'; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | // Adjusting Right Expression |
99 | 99 | $rightExpr = (string) $this->rightExpr; |
100 | 100 | |
101 | 101 | if ($this->rightExpr instanceof Math) { |
102 | - $rightExpr = '(' . $rightExpr . ')'; |
|
102 | + $rightExpr = '('.$rightExpr.')'; |
|
103 | 103 | } |
104 | 104 | |
105 | - return $leftExpr . ' ' . $this->operator . ' ' . $rightExpr; |
|
105 | + return $leftExpr.' '.$this->operator.' '.$rightExpr; |
|
106 | 106 | } |
107 | 107 | } |
@@ -58,12 +58,12 @@ |
||
58 | 58 | $queryPart = (string) $part; |
59 | 59 | |
60 | 60 | if (is_object($part) && $part instanceof self && $part->count() > 1) { |
61 | - return $this->preSeparator . $queryPart . $this->postSeparator; |
|
61 | + return $this->preSeparator.$queryPart.$this->postSeparator; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | // Fixes DDC-1237: User may have added a where item containing nested expression (with "OR" or "AND") |
65 | 65 | if (stripos($queryPart, ' OR ') !== false || stripos($queryPart, ' AND ') !== false) { |
66 | - return $this->preSeparator . $queryPart . $this->postSeparator; |
|
66 | + return $this->preSeparator.$queryPart.$this->postSeparator; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | return $queryPart; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function add($arg) |
88 | 88 | { |
89 | - if ( $arg !== null && (!$arg instanceof self || $arg->count() > 0) ) { |
|
89 | + if ($arg !== null && ( ! $arg instanceof self || $arg->count() > 0)) { |
|
90 | 90 | // If we decide to keep Expr\Base instances, we can use this check |
91 | 91 | if ( ! is_string($arg)) { |
92 | 92 | $class = get_class($arg); |
@@ -119,6 +119,6 @@ discard block |
||
119 | 119 | return (string) $this->parts[0]; |
120 | 120 | } |
121 | 121 | |
122 | - return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator; |
|
122 | + return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator; |
|
123 | 123 | } |
124 | 124 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | */ |
87 | 87 | public function __toString() |
88 | 88 | { |
89 | - return $this->from . ' ' . $this->alias . |
|
90 | - ($this->indexBy ? ' INDEX BY ' . $this->indexBy : ''); |
|
89 | + return $this->from.' '.$this->alias. |
|
90 | + ($this->indexBy ? ' INDEX BY '.$this->indexBy : ''); |
|
91 | 91 | } |
92 | 92 | } |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | public function startProduction($name) |
67 | 67 | { |
68 | - $this->println('(' . $name); |
|
68 | + $this->println('('.$name); |
|
69 | 69 | $this->_indent++; |
70 | 70 | } |
71 | 71 |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function countDistinct($x) |
270 | 270 | { |
271 | - return 'COUNT(DISTINCT ' . implode(', ', func_get_args()) . ')'; |
|
271 | + return 'COUNT(DISTINCT '.implode(', ', func_get_args()).')'; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | } |
451 | 451 | } |
452 | 452 | |
453 | - return new Expr\Func($x . ' IN', (array) $y); |
|
453 | + return new Expr\Func($x.' IN', (array) $y); |
|
454 | 454 | } |
455 | 455 | |
456 | 456 | /** |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | } |
472 | 472 | } |
473 | 473 | |
474 | - return new Expr\Func($x . ' NOT IN', (array) $y); |
|
474 | + return new Expr\Func($x.' NOT IN', (array) $y); |
|
475 | 475 | } |
476 | 476 | |
477 | 477 | /** |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | */ |
484 | 484 | public function isNull($x) |
485 | 485 | { |
486 | - return $x . ' IS NULL'; |
|
486 | + return $x.' IS NULL'; |
|
487 | 487 | } |
488 | 488 | |
489 | 489 | /** |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | */ |
496 | 496 | public function isNotNull($x) |
497 | 497 | { |
498 | - return $x . ' IS NOT NULL'; |
|
498 | + return $x.' IS NOT NULL'; |
|
499 | 499 | } |
500 | 500 | |
501 | 501 | /** |
@@ -613,12 +613,12 @@ discard block |
||
613 | 613 | */ |
614 | 614 | private function _quoteLiteral($literal) |
615 | 615 | { |
616 | - if (is_numeric($literal) && !is_string($literal)) { |
|
616 | + if (is_numeric($literal) && ! is_string($literal)) { |
|
617 | 617 | return (string) $literal; |
618 | 618 | } else if (is_bool($literal)) { |
619 | 619 | return $literal ? "true" : "false"; |
620 | 620 | } else { |
621 | - return "'" . str_replace("'", "''", $literal) . "'"; |
|
621 | + return "'".str_replace("'", "''", $literal)."'"; |
|
622 | 622 | } |
623 | 623 | } |
624 | 624 | |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | */ |
634 | 634 | public function between($val, $x, $y) |
635 | 635 | { |
636 | - return $val . ' BETWEEN ' . $x . ' AND ' . $y; |
|
636 | + return $val.' BETWEEN '.$x.' AND '.$y; |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | /** |
@@ -227,7 +227,9 @@ |
||
227 | 227 | $found = false; |
228 | 228 | |
229 | 229 | foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) { |
230 | - if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue; |
|
230 | + if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { |
|
231 | + continue; |
|
232 | + } |
|
231 | 233 | |
232 | 234 | $this->addIndexByColumn($alias, $columnName); |
233 | 235 | $found = true; |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | */ |
101 | 101 | final public function getParameter($name) |
102 | 102 | { |
103 | - if (!isset($this->parameters[$name])) { |
|
104 | - throw new \InvalidArgumentException("Parameter '" . $name . "' does not exist."); |
|
103 | + if ( ! isset($this->parameters[$name])) { |
|
104 | + throw new \InvalidArgumentException("Parameter '".$name."' does not exist."); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | final public function hasParameter($name) |
118 | 118 | { |
119 | - if (!isset($this->parameters[$name])) { |
|
119 | + if ( ! isset($this->parameters[$name])) { |
|
120 | 120 | return false; |
121 | 121 | } |
122 | 122 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function getRepository(EntityManagerInterface $entityManager, $entityName) |
43 | 43 | { |
44 | - $repositoryHash = $entityManager->getClassMetadata($entityName)->getName() . spl_object_hash($entityManager); |
|
44 | + $repositoryHash = $entityManager->getClassMetadata($entityName)->getName().spl_object_hash($entityManager); |
|
45 | 45 | |
46 | 46 | if (isset($this->repositoryList[$repositoryHash])) { |
47 | 47 | return $this->repositoryList[$repositoryHash]; |