@@ -453,7 +453,7 @@ |
||
| 453 | 453 | ): AccessorInterface { |
| 454 | 454 | if (!is_string($accessor) || !class_exists($accessor)) { |
| 455 | 455 | throw new EntityException( |
| 456 | - "Unable to create accessor for field {$field} in " . static::class |
|
| 456 | + "Unable to create accessor for field {$field} in ".static::class |
|
| 457 | 457 | ); |
| 458 | 458 | } |
| 459 | 459 | |
@@ -115,14 +115,14 @@ discard block |
||
| 115 | 115 | public function getPrimary(string $prefix, string $table): string |
| 116 | 116 | { |
| 117 | 117 | if (!empty($this->memory) && empty($this->primaryKeys)) { |
| 118 | - $this->primaryKeys = (array)$this->memory->loadData($this->getSource() . '.keys'); |
|
| 118 | + $this->primaryKeys = (array)$this->memory->loadData($this->getSource().'.keys'); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | if (!empty($this->primaryKeys) && array_key_exists($table, $this->primaryKeys)) { |
| 122 | 122 | return $this->primaryKeys[$table]; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - if (!$this->hasTable($prefix . $table)) { |
|
| 125 | + if (!$this->hasTable($prefix.$table)) { |
|
| 126 | 126 | throw new DriverException( |
| 127 | 127 | "Unable to fetch table primary key, no such table '{$prefix}{$table}' exists" |
| 128 | 128 | ); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | //Caching |
| 140 | 140 | if (!empty($this->memory)) { |
| 141 | - $this->memory->saveData($this->getSource() . '.keys', $this->primaryKeys); |
|
| 141 | + $this->memory->saveData($this->getSource().'.keys', $this->primaryKeys); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | return $this->primaryKeys[$table]; |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | { |
| 154 | 154 | return $this->container->make( |
| 155 | 155 | PostgresInsertQuery::class, |
| 156 | - ['driver' => $this, 'compiler' => $this->queryCompiler($prefix),] + $parameters |
|
| 156 | + ['driver' => $this, 'compiler' => $this->queryCompiler($prefix), ] + $parameters |
|
| 157 | 157 | ); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | return $helper->createAggregation($method); |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - throw new DocumentException("Undefined method call '{$method}' in '" . get_called_class() . "'"); |
|
| 252 | + throw new DocumentException("Undefined method call '{$method}' in '".get_called_class()."'"); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | /** |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | if ($value instanceof CompositableInterface) { |
| 316 | 316 | $atomics = array_merge_recursive( |
| 317 | 317 | $atomics, |
| 318 | - $value->buildAtomics((!empty($container) ? $container . '.' : '') . $field) |
|
| 318 | + $value->buildAtomics((!empty($container) ? $container.'.' : '').$field) |
|
| 319 | 319 | ); |
| 320 | 320 | |
| 321 | 321 | continue; |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | |
| 331 | 331 | if (array_key_exists($field, $this->changes)) { |
| 332 | 332 | //Generating set operation for changed field |
| 333 | - $atomics['$set'][(!empty($container) ? $container . '.' : '') . $field] = $value; |
|
| 333 | + $atomics['$set'][(!empty($container) ? $container.'.' : '').$field] = $value; |
|
| 334 | 334 | } |
| 335 | 335 | } |
| 336 | 336 | |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | { |
| 378 | 378 | $public = parent::publicFields(); |
| 379 | 379 | |
| 380 | - array_walk_recursive($public, function (&$value) { |
|
| 380 | + array_walk_recursive($public, function(&$value) { |
|
| 381 | 381 | if ($value instanceof ObjectID) { |
| 382 | 382 | $value = (string)$value; |
| 383 | 383 | } |
@@ -244,6 +244,6 @@ |
||
| 244 | 244 | $names = [$source->getRole(), $target->getRole()]; |
| 245 | 245 | asort($names); |
| 246 | 246 | |
| 247 | - return implode('_', $names) . static::PIVOT_POSTFIX; |
|
| 247 | + return implode('_', $names).static::PIVOT_POSTFIX; |
|
| 248 | 248 | } |
| 249 | 249 | } |
| 250 | 250 | \ No newline at end of file |
@@ -106,6 +106,6 @@ |
||
| 106 | 106 | $pivotData = $data[ORMInterface::PIVOT_DATA]; |
| 107 | 107 | |
| 108 | 108 | //Unique row criteria |
| 109 | - return $pivotData[$this->innerPivotKey] . '.' . $pivotData[$this->outerPivotKey]; |
|
| 109 | + return $pivotData[$this->innerPivotKey].'.'.$pivotData[$this->outerPivotKey]; |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | \ No newline at end of file |
@@ -46,14 +46,14 @@ discard block |
||
| 46 | 46 | if ($this->isJoined()) { |
| 47 | 47 | $query->join( |
| 48 | 48 | $this->getMethod() == self::JOIN ? 'INNER' : 'LEFT', |
| 49 | - $this->pivotTable() . ' AS ' . $this->pivotAlias(), |
|
| 49 | + $this->pivotTable().' AS '.$this->pivotAlias(), |
|
| 50 | 50 | [$this->pivotKey(Record::THOUGHT_INNER_KEY) => $this->parentKey(Record::INNER_KEY)] |
| 51 | 51 | ); |
| 52 | 52 | } else { |
| 53 | 53 | //TODO: outer keys |
| 54 | 54 | $query->join( |
| 55 | 55 | $this->getMethod() == self::JOIN ? 'INNER' : 'LEFT', |
| 56 | - $this->pivotTable() . ' AS ' . $this->pivotAlias() |
|
| 56 | + $this->pivotTable().' AS '.$this->pivotAlias() |
|
| 57 | 57 | )->onWhere( |
| 58 | 58 | $this->pivotKey(Record::THOUGHT_INNER_KEY), |
| 59 | 59 | new Parameter($outerKeys) |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if ($this->isJoined()) { |
| 67 | 67 | $query->join( |
| 68 | 68 | $this->getMethod() == self::JOIN ? 'INNER' : 'LEFT', |
| 69 | - $this->getTable() . ' AS ' . $this->getAlias(), |
|
| 69 | + $this->getTable().' AS '.$this->getAlias(), |
|
| 70 | 70 | [$this->pivotKey(Record::THOUGHT_OUTER_KEY) => $this->localKey(Record::OUTER_KEY)] |
| 71 | 71 | ); |
| 72 | 72 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | if ($minify) { |
| 105 | 105 | //Let's use column number instead of full name |
| 106 | - $column = 'p_c' . count($columns); |
|
| 106 | + $column = 'p_c'.count($columns); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | $columns[] = "{$alias}.{$name} AS {$prefix}{$column}"; |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | return $this->options['pivotAlias']; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - return $this->getAlias() . '_pivot'; |
|
| 155 | + return $this->getAlias().'_pivot'; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
@@ -178,6 +178,6 @@ discard block |
||
| 178 | 178 | return null; |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - return $this->pivotAlias() . '.' . $this->schema[$key]; |
|
| 181 | + return $this->pivotAlias().'.'.$this->schema[$key]; |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | \ No newline at end of file |