@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $this->getToken(); |
58 | 58 | $expression = $this->parseExpression(); |
59 | 59 | if ($this->token !== false) { |
60 | - throw new FilterCompilerException("Unexpected '" . $this->token . "' in filter [$filter]"); |
|
60 | + throw new FilterCompilerException("Unexpected '".$this->token."' in filter [$filter]"); |
|
61 | 61 | } |
62 | 62 | $parsed = $this->renderExpression($expression); |
63 | 63 | return $parsed; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | private function renderExpression($expression) { |
67 | 67 | if (is_array($expression)) { |
68 | - $expression = $this->renderExpression($expression['left']) . " {$expression['opr']} " . $this->renderExpression($expression['right']); |
|
68 | + $expression = $this->renderExpression($expression['left'])." {$expression['opr']} ".$this->renderExpression($expression['right']); |
|
69 | 69 | } |
70 | 70 | return $expression; |
71 | 71 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $tokens = [$tokens]; |
76 | 76 | } |
77 | 77 | if (array_search($this->lookahead, $tokens) === false) { |
78 | - throw new FilterCompilerException("Expected " . implode(' or ', $tokens) . " but found " . $this->lookahead); |
|
78 | + throw new FilterCompilerException("Expected ".implode(' or ', $tokens)." but found ".$this->lookahead); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | private function returnPositionTag() { |
163 | - return ":filter_bind_" . ( ++$this->numPositions); |
|
163 | + return ":filter_bind_".( ++$this->numPositions); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | private function parseObracket() { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | } |
238 | 238 | |
239 | 239 | if ($this->token === false && strlen($this->filter) > 0) { |
240 | - throw new FilterCompilerException("Unexpected character [" . $this->filter[0] . "] begining " . $this->filter . "."); |
|
240 | + throw new FilterCompilerException("Unexpected character [".$this->filter[0]."] begining ".$this->filter."."); |
|
241 | 241 | } |
242 | 242 | } |
243 | 243 | |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | $rewritten = []; |
252 | 252 | foreach ($data as $key => $value) { |
253 | 253 | if (is_numeric($key)) { |
254 | - $rewritten["filter_bind_" . ($key + 1)] = $value; |
|
254 | + $rewritten["filter_bind_".($key + 1)] = $value; |
|
255 | 255 | } else { |
256 | 256 | $rewritten[$key] = $value; |
257 | 257 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | public static function getInstance() { |
70 | - if(self::$instance === null) throw new NibiiException("A context has not yet been initialized"); |
|
70 | + if (self::$instance === null) throw new NibiiException("A context has not yet been initialized"); |
|
71 | 71 | return self::$instance; |
72 | 72 | } |
73 | 73 |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | $this->quotedTable = $driver->quoteIdentifier($table); |
65 | 65 | $this->table = $this->unquotedTable = $table; |
66 | 66 | } else { |
67 | - $this->quotedTable = ( isset($table['schema']) ? "{$driver->quoteIdentifier($table["schema"])}." : "") . $driver->quoteIdentifier($table["table"]); |
|
68 | - $this->unquotedTable = (isset($table['schema']) ? "{$table['schema']}." : "") . $table['table']; |
|
67 | + $this->quotedTable = (isset($table['schema']) ? "{$driver->quoteIdentifier($table["schema"])}." : "").$driver->quoteIdentifier($table["table"]); |
|
68 | + $this->unquotedTable = (isset($table['schema']) ? "{$table['schema']}." : "").$table['table']; |
|
69 | 69 | $this->table = $table['table']; |
70 | 70 | $this->schema = $table['schema']; |
71 | 71 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function getDescription() { |
85 | 85 | return $this->context->getCache()->read( |
86 | - (new \ReflectionClass($this))->getName() . '::desc', function() { |
|
86 | + (new \ReflectionClass($this))->getName().'::desc', function() { |
|
87 | 87 | return $this->container->resolve(ModelDescription::class, ['model' => $this]); |
88 | 88 | } |
89 | 89 | ); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $this->options['foreign_key'] = $model->getDescription()->getPrimaryKey()[0]; |
54 | 54 | } |
55 | 55 | if ($this->options['local_key'] == null) { |
56 | - $this->options['local_key'] = Text::singularize($table) . '_id'; |
|
56 | + $this->options['local_key'] = Text::singularize($table).'_id'; |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 |