@@ -170,7 +170,7 @@ |
||
170 | 170 | |
171 | 171 | // Recognize identifiers, aliased or qualified names |
172 | 172 | case (ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\'): |
173 | - $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value); |
|
173 | + $name = 'Doctrine\ORM\Query\Lexer::T_'.strtoupper($value); |
|
174 | 174 | |
175 | 175 | if (defined($name)) { |
176 | 176 | $type = constant($name); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * A filter object is in CLEAN state when it has no changed parameters. |
35 | 35 | */ |
36 | - const FILTERS_STATE_CLEAN = 1; |
|
36 | + const FILTERS_STATE_CLEAN = 1; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * A filter object is in DIRTY state when it has changed parameters. |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function enable($name) |
105 | 105 | { |
106 | 106 | if ( ! $this->has($name)) { |
107 | - throw new \InvalidArgumentException("Filter '" . $name . "' does not exist."); |
|
107 | + throw new \InvalidArgumentException("Filter '".$name."' does not exist."); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | if ( ! $this->isEnabled($name)) { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | public function getFilter($name) |
157 | 157 | { |
158 | 158 | if ( ! $this->isEnabled($name)) { |
159 | - throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled."); |
|
159 | + throw new \InvalidArgumentException("Filter '".$name."' is not enabled."); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | return $this->enabledFilters[$name]; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $filterHash = ''; |
210 | 210 | |
211 | 211 | foreach ($this->enabledFilters as $name => $filter) { |
212 | - $filterHash .= $name . $filter; |
|
212 | + $filterHash .= $name.$filter; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | return $filterHash; |
@@ -73,6 +73,6 @@ |
||
73 | 73 | */ |
74 | 74 | public function __toString() |
75 | 75 | { |
76 | - return $this->name . '(' . implode(', ', $this->arguments) . ')'; |
|
76 | + return $this->name.'('.implode(', ', $this->arguments).')'; |
|
77 | 77 | } |
78 | 78 | } |
@@ -138,8 +138,8 @@ |
||
138 | 138 | public function __toString() |
139 | 139 | { |
140 | 140 | return strtoupper($this->joinType) . ' JOIN ' . $this->join |
141 | - . ($this->alias ? ' ' . $this->alias : '') |
|
142 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
141 | + . ($this->alias ? ' ' . $this->alias : '') |
|
142 | + . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | + . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
144 | 144 | } |
145 | 145 | } |
@@ -137,9 +137,9 @@ |
||
137 | 137 | */ |
138 | 138 | public function __toString() |
139 | 139 | { |
140 | - return strtoupper($this->joinType) . ' JOIN ' . $this->join |
|
141 | - . ($this->alias ? ' ' . $this->alias : '') |
|
142 | - . ($this->indexBy ? ' INDEX BY ' . $this->indexBy : '') |
|
143 | - . ($this->condition ? ' ' . strtoupper($this->conditionType) . ' ' . $this->condition : ''); |
|
140 | + return strtoupper($this->joinType).' JOIN '.$this->join |
|
141 | + . ($this->alias ? ' '.$this->alias : '') |
|
142 | + . ($this->indexBy ? ' INDEX BY '.$this->indexBy : '') |
|
143 | + . ($this->condition ? ' '.strtoupper($this->conditionType).' '.$this->condition : ''); |
|
144 | 144 | } |
145 | 145 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | /** |
34 | 34 | * @var string |
35 | 35 | */ |
36 | - protected $preSeparator = ''; |
|
36 | + protected $preSeparator = ''; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var string |
@@ -95,6 +95,6 @@ |
||
95 | 95 | */ |
96 | 96 | public function __toString() |
97 | 97 | { |
98 | - return $this->leftExpr . ' ' . $this->operator . ' ' . $this->rightExpr; |
|
98 | + return $this->leftExpr.' '.$this->operator.' '.$this->rightExpr; |
|
99 | 99 | } |
100 | 100 | } |
@@ -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 | } |