@@ -204,6 +204,10 @@ |
||
204 | 204 | return $return; |
205 | 205 | } |
206 | 206 | |
207 | + /** |
|
208 | + * @param integer $level |
|
209 | + * @param string $opr |
|
210 | + */ |
|
207 | 211 | private function parseRightExpression($level, $opr) |
208 | 212 | { |
209 | 213 | switch ($opr) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $this->getToken(); |
62 | 62 | $expression = $this->parseExpression(); |
63 | 63 | if ($this->token !== false) { |
64 | - throw new FilterCompilerException("Unexpected '" . $this->token . "' in filter [$filter]"); |
|
64 | + throw new FilterCompilerException("Unexpected '".$this->token."' in filter [$filter]"); |
|
65 | 65 | } |
66 | 66 | $parsed = $this->renderExpression($expression); |
67 | 67 | return $parsed; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | private function renderExpression($expression) |
71 | 71 | { |
72 | 72 | if (is_array($expression)) { |
73 | - $expression = $this->renderExpression($expression['left']) . " {$expression['opr']} " . $this->renderExpression($expression['right']); |
|
73 | + $expression = $this->renderExpression($expression['left'])." {$expression['opr']} ".$this->renderExpression($expression['right']); |
|
74 | 74 | } |
75 | 75 | return $expression; |
76 | 76 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $tokens = [$tokens]; |
82 | 82 | } |
83 | 83 | if (array_search($this->lookahead, $tokens) === false) { |
84 | - throw new FilterCompilerException("Expected " . implode(' or ', $tokens) . " but found " . $this->lookahead); |
|
84 | + throw new FilterCompilerException("Expected ".implode(' or ', $tokens)." but found ".$this->lookahead); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | private function returnPositionTag() |
175 | 175 | { |
176 | - return ":filter_bind_" . (++$this->numPositions); |
|
176 | + return ":filter_bind_".(++$this->numPositions); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | private function parseObracket() |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | } |
259 | 259 | |
260 | 260 | if ($this->token === false && strlen($this->filter) > 0) { |
261 | - throw new FilterCompilerException("Unexpected character [" . $this->filter[0] . "] begining " . $this->filter . "."); |
|
261 | + throw new FilterCompilerException("Unexpected character [".$this->filter[0]."] begining ".$this->filter."."); |
|
262 | 262 | } |
263 | 263 | } |
264 | 264 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $rewritten = []; |
275 | 275 | foreach ($data as $key => $value) { |
276 | 276 | if (is_numeric($key)) { |
277 | - $rewritten["filter_bind_" . ($key + 1)] = $value; |
|
277 | + $rewritten["filter_bind_".($key + 1)] = $value; |
|
278 | 278 | } else { |
279 | 279 | $rewritten[$key] = $value; |
280 | 280 | } |
@@ -395,6 +395,9 @@ discard block |
||
395 | 395 | |
396 | 396 | } |
397 | 397 | |
398 | + /** |
|
399 | + * @param string $id |
|
400 | + */ |
|
398 | 401 | public function postSaveCallback($id) |
399 | 402 | { |
400 | 403 | |
@@ -431,6 +434,10 @@ discard block |
||
431 | 434 | return $this->adapter; |
432 | 435 | } |
433 | 436 | |
437 | + /** |
|
438 | + * @param Relationship[] $relationships |
|
439 | + * @param integer $depth |
|
440 | + */ |
|
434 | 441 | private function expandArrayValue($array, $relationships, $depth, $expandableModels = [], $index = null) |
435 | 442 | { |
436 | 443 | if (empty($expandableModels)) { |
@@ -135,8 +135,8 @@ discard block |
||
135 | 135 | $this->table = $table['table']; |
136 | 136 | $this->schema = $table['schema']; |
137 | 137 | } |
138 | - $this->quotedTable = ($this->schema ? "{$driver->quoteIdentifier($this->schema)}." : "") . $driver->quoteIdentifier($this->table); |
|
139 | - $this->unquotedTable = ($this->schema ? "{$this->schema}." : "") . $this->table; |
|
138 | + $this->quotedTable = ($this->schema ? "{$driver->quoteIdentifier($this->schema)}." : "").$driver->quoteIdentifier($this->table); |
|
139 | + $this->unquotedTable = ($this->schema ? "{$this->schema}." : "").$this->table; |
|
140 | 140 | $this->adapter->setModel($this, $this->quotedTable); |
141 | 141 | $this->initialized = true; |
142 | 142 | } |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | { |
156 | 156 | $this->initialize(); |
157 | 157 | return $this->context->getCache()->read( |
158 | - "{$this->className}::desc", function () { |
|
158 | + "{$this->className}::desc", function() { |
|
159 | 159 | return $this->context->getModelDescription($this); |
160 | 160 | } |
161 | 161 | ); |