@@ -201,7 +201,7 @@ |
||
| 201 | 201 | $field = new Field(); |
| 202 | 202 | |
| 203 | 203 | $field->setType($column->getType()); |
| 204 | - $field->setColumn($columnPrefix . ($column->getColumn() ?? Inflector::tableize($name))); |
|
| 204 | + $field->setColumn($columnPrefix.($column->getColumn() ?? Inflector::tableize($name))); |
|
| 205 | 205 | $field->setPrimary($column->isPrimary()); |
| 206 | 206 | |
| 207 | 207 | $field->setTypecast($this->resolveTypecast($column->getTypecast(), $class)); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | |
| 38 | 38 | // each embedded entity must isolated |
| 39 | 39 | $target = clone $target; |
| 40 | - $target->setRole($source->getRole() . ':' . $target->getRole()); |
|
| 40 | + $target->setRole($source->getRole().':'.$target->getRole()); |
|
| 41 | 41 | |
| 42 | 42 | // embedded entity must point to the same table as parent entity |
| 43 | 43 | $registry->register($target); |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | |
| 141 | 141 | $schema = $registry->getRelation($entity, $name); |
| 142 | 142 | if (!$schema instanceof InversableInterface) { |
| 143 | - throw new SchemaException('Unable to inverse relation of type ' . get_class($schema)); |
|
| 143 | + throw new SchemaException('Unable to inverse relation of type '.get_class($schema)); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | foreach ($schema->inverseTargets($registry) as $target) { |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | return true; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - $criteria = (string)$data[$this->duplicateCriteria]; |
|
| 49 | + $criteria = (string) $data[$this->duplicateCriteria]; |
|
| 50 | 50 | |
| 51 | 51 | if (isset($this->duplicates[$criteria])) { |
| 52 | 52 | // duplicate is presented, let's reduplicate |
@@ -376,7 +376,7 @@ |
||
| 376 | 376 | return $result; |
| 377 | 377 | } catch (Throwable $e) { |
| 378 | 378 | throw new ParserException( |
| 379 | - 'Unable to parse incoming row: ' . $e->getMessage(), |
|
| 379 | + 'Unable to parse incoming row: '.$e->getMessage(), |
|
| 380 | 380 | $e->getCode(), |
| 381 | 381 | $e |
| 382 | 382 | ); |
@@ -47,13 +47,13 @@ |
||
| 47 | 47 | |
| 48 | 48 | switch ($rule) { |
| 49 | 49 | case 'int': |
| 50 | - $values[$key] = (int)$values[$key]; |
|
| 50 | + $values[$key] = (int) $values[$key]; |
|
| 51 | 51 | break; |
| 52 | 52 | case 'bool': |
| 53 | - $values[$key] = (bool)$values[$key]; |
|
| 53 | + $values[$key] = (bool) $values[$key]; |
|
| 54 | 54 | break; |
| 55 | 55 | case 'float': |
| 56 | - $values[$key] = (float)$values[$key]; |
|
| 56 | + $values[$key] = (float) $values[$key]; |
|
| 57 | 57 | break; |
| 58 | 58 | case 'datetime': |
| 59 | 59 | $values[$key] = new DateTimeImmutable( |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | $column = sprintf('DISTINCT(%s)', $this->loader->getPK()); |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - return (int)$this->__call('count', [$column]); |
|
| 173 | + return (int) $this->__call('count', [$column]); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $class = $schema->define($role, Schema::MAPPER) ?? $this->defaults[Schema::MAPPER]; |
| 89 | 89 | |
| 90 | 90 | if (!is_subclass_of($class, MapperInterface::class)) { |
| 91 | - throw new TypecastException($class . ' not implement MapperInterface'); |
|
| 91 | + throw new TypecastException($class.' not implement MapperInterface'); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | return $this->factory->make( |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $class = $schema->define($role, Schema::REPOSITORY) ?? $this->defaults[Schema::REPOSITORY]; |
| 167 | 167 | |
| 168 | 168 | if (!is_subclass_of($class, RepositoryInterface::class)) { |
| 169 | - throw new TypecastException($class . ' not implement RepositoryInterface'); |
|
| 169 | + throw new TypecastException($class.' not implement RepositoryInterface'); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | return $this->factory->make($class, ['select' => $select, 'orm' => $orm]); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $source = $schema->define($role, Schema::SOURCE) ?? $this->defaults[Schema::SOURCE]; |
| 184 | 184 | |
| 185 | 185 | if (!is_subclass_of($source, SourceInterface::class)) { |
| 186 | - throw new TypecastException($source . ' not implement SourceInterface'); |
|
| 186 | + throw new TypecastException($source.' not implement SourceInterface'); |
|
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | if ($source !== Source::class) { |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | if (!is_subclass_of($constrain, ConstrainInterface::class)) { |
| 205 | - throw new TypecastException($constrain . ' not implement ConstrainInterface'); |
|
| 205 | + throw new TypecastException($constrain.' not implement ConstrainInterface'); |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | return $source->withConstrain(is_object($constrain) ? $constrain : $this->factory->make($constrain)); |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | if (count($this->runner) === $lastExecuted && $pending !== []) { |
| 113 | - throw new TransactionException('Unable to complete: ' . $this->listCommands($pending)); |
|
| 113 | + throw new TransactionException('Unable to complete: '.$this->listCommands($pending)); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | $commands = $pending; |