@@ -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 |
@@ -424,7 +424,7 @@ |
||
424 | 424 | |
425 | 425 | if (!$injector instanceof InjectorInterface) { |
426 | 426 | throw new InjectionException( |
427 | - "Class '" . get_class($injector) . "' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
427 | + "Class '".get_class($injector)."' must be an instance of InjectorInterface for '{$reflection->getName()}'" |
|
428 | 428 | ); |
429 | 429 | } |
430 | 430 |
@@ -426,7 +426,7 @@ |
||
426 | 426 | ): AccessorInterface { |
427 | 427 | if (!is_string($accessor) || !class_exists($accessor)) { |
428 | 428 | throw new EntityException( |
429 | - "Unable to create accessor for field {$name} in " . static::class |
|
429 | + "Unable to create accessor for field {$name} in ".static::class |
|
430 | 430 | ); |
431 | 431 | } |
432 | 432 |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $args[0] = $this->prepare($args[0]); |
130 | 130 | |
131 | 131 | //Routing where |
132 | - call_user_func_array([$this->query, 'and' . ucfirst($this->target)], $args); |
|
132 | + call_user_func_array([$this->query, 'and'.ucfirst($this->target)], $args); |
|
133 | 133 | |
134 | 134 | return $this; |
135 | 135 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $args[0] = $this->prepare($args[0]); |
159 | 159 | |
160 | 160 | //Routing where |
161 | - call_user_func_array([$this->query, 'or' . ucfirst($this->target)], $args); |
|
161 | + call_user_func_array([$this->query, 'or'.ucfirst($this->target)], $args); |
|
162 | 162 | |
163 | 163 | return $this; |
164 | 164 | } |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | * @param bool $changedEntities Reference, will be set to true if any of entities changed |
260 | 260 | * internally. |
261 | 261 | */ |
262 | - public function hasChanges(bool &$changedEntities = null): bool |
|
262 | + public function hasChanges(bool & $changedEntities = null): bool |
|
263 | 263 | { |
264 | 264 | foreach ($this->entities as $entity) { |
265 | 265 | if ($entity->hasChanges()) { |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | $atomics = array_merge( |
328 | 328 | $atomics, |
329 | - $entity->buildAtomics((!empty($container) ? $container . '.' : '') . $offset) |
|
329 | + $entity->buildAtomics((!empty($container) ? $container.'.' : '').$offset) |
|
330 | 330 | ); |
331 | 331 | } |
332 | 332 |
@@ -78,7 +78,7 @@ |
||
78 | 78 | */ |
79 | 79 | public function primaryKey(): string |
80 | 80 | { |
81 | - return $this->getAlias() . '.' . $this->schema[Record::SH_PRIMARY_KEY]; |
|
81 | + return $this->getAlias().'.'.$this->schema[Record::SH_PRIMARY_KEY]; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | |
269 | 269 | //Dropping enum constrain before any operation |
270 | 270 | if ($initial->abstractType() == 'enum' && $this->constrained) { |
271 | - $operations[] = 'DROP CONSTRAINT ' . $driver->identifier($this->enumConstraint()); |
|
271 | + $operations[] = 'DROP CONSTRAINT '.$driver->identifier($this->enumConstraint()); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | //Default value set and dropping |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | |
283 | 283 | //Nullable option |
284 | 284 | if ($initial->nullable != $this->nullable) { |
285 | - $operations[] = "ALTER COLUMN {$identifier} " . (!$this->nullable ? 'SET' : 'DROP') . ' NOT NULL'; |
|
285 | + $operations[] = "ALTER COLUMN {$identifier} ".(!$this->nullable ? 'SET' : 'DROP').' NOT NULL'; |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | if ($this->abstractType() == 'enum') { |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | } |
293 | 293 | |
294 | 294 | $operations[] = "ADD CONSTRAINT {$driver->identifier($this->enumConstraint())} " |
295 | - . "CHECK ({$identifier} IN (" . implode(', ', $enumValues) . '))'; |
|
295 | + . "CHECK ({$identifier} IN (".implode(', ', $enumValues).'))'; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | return $operations; |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | protected function quoteEnum(Driver $driver): string |
305 | 305 | { |
306 | 306 | //Postgres enums are just constrained strings |
307 | - return '(' . $this->size . ')'; |
|
307 | + return '('.$this->size.')'; |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | /** |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | private function enumConstraint(): string |
316 | 316 | { |
317 | 317 | if (empty($this->constrainName)) { |
318 | - $this->constrainName = $this->table . '_' . $this->getName() . '_enum_' . uniqid(); |
|
318 | + $this->constrainName = $this->table.'_'.$this->getName().'_enum_'.uniqid(); |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | return $this->constrainName; |
@@ -419,11 +419,11 @@ discard block |
||
419 | 419 | |
420 | 420 | $constraints = $driver->query($query, [ |
421 | 421 | $tableOID, |
422 | - '(' . $column->name . '%', |
|
423 | - '("' . $column->name . '%', |
|
422 | + '('.$column->name.'%', |
|
423 | + '("'.$column->name.'%', |
|
424 | 424 | //Postgres magic |
425 | - $column->name . '::text%', |
|
426 | - '%(' . $column->name . ')::text%' |
|
425 | + $column->name.'::text%', |
|
426 | + '%('.$column->name.')::text%' |
|
427 | 427 | ]); |
428 | 428 | |
429 | 429 | foreach ($constraints as $constraint) { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | */ |
454 | 454 | private static function resolveEnum(Driver $driver, PostgresColumn $column) |
455 | 455 | { |
456 | - $range = $driver->query('SELECT enum_range(NULL::' . $column->type . ')')->fetchColumn(0); |
|
456 | + $range = $driver->query('SELECT enum_range(NULL::'.$column->type.')')->fetchColumn(0); |
|
457 | 457 | |
458 | 458 | $column->enumValues = explode(',', substr($range, 1, -1)); |
459 | 459 |
@@ -212,7 +212,7 @@ |
||
212 | 212 | $class = (new \ReflectionClass($accessor->getClass()))->getShortName(); |
213 | 213 | |
214 | 214 | //[+] for loaded, [~] for lazy loaded |
215 | - $relations[$relation] = $type . '(' . $class . ') [' . ($accessor->isLoaded() ? '+]' : '~]'); |
|
215 | + $relations[$relation] = $type.'('.$class.') ['.($accessor->isLoaded() ? '+]' : '~]'); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | return $relations; |