@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | foreach ($model->getForeignModels(self::RELATION_ONE_TO_ONE) as $foreign) { |
| 195 | 195 | $id = $this->createRecords($foreign); |
| 196 | 196 | $this->finalizeModel($foreign); |
| 197 | - $name = $foreign->getName() . self::ID_SUFFIX; |
|
| 197 | + $name = $foreign->getName().self::ID_SUFFIX; |
|
| 198 | 198 | $model->$name = $id; |
| 199 | 199 | } |
| 200 | 200 | }); |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | { |
| 208 | 208 | $id = $model->getId(); |
| 209 | 209 | foreach ($model->getForeignModels(self::RELATION_ONE_TO_MANY) as $foreign) { |
| 210 | - $key = $model->getName() . self::ID_SUFFIX; |
|
| 210 | + $key = $model->getName().self::ID_SUFFIX; |
|
| 211 | 211 | $foreign->$key = $id; |
| 212 | 212 | $this->createTable($foreign, $this->createConstraintsOtm($model)); |
| 213 | 213 | } |
@@ -227,10 +227,10 @@ discard block |
||
| 227 | 227 | { |
| 228 | 228 | $id = $model->getId(); |
| 229 | 229 | foreach ($model->getForeignModels(self::RELATION_MANY_TO_MANY) as $foreign) { |
| 230 | - $model_id = $model->getName() . self::ID_SUFFIX; |
|
| 231 | - $foreign_id = $foreign->getName() . self::ID_SUFFIX; |
|
| 230 | + $model_id = $model->getName().self::ID_SUFFIX; |
|
| 231 | + $foreign_id = $foreign->getName().self::ID_SUFFIX; |
|
| 232 | 232 | $relational_table = $this->modelManager->create( |
| 233 | - $model->getName() . '_' . $foreign->getName() |
|
| 233 | + $model->getName().'_'.$foreign->getName() |
|
| 234 | 234 | ); |
| 235 | 235 | |
| 236 | 236 | $default_id = $this->config->isUsingUUID() ? '' : 0; |
@@ -249,11 +249,11 @@ discard block |
||
| 249 | 249 | $rel_id = $this->createRecords($foreign); |
| 250 | 250 | $this->finalizeModel($foreign); |
| 251 | 251 | |
| 252 | - $model_id = $model->getName() . self::ID_SUFFIX; |
|
| 253 | - $foreign_id = $foreign->getName() . self::ID_SUFFIX; |
|
| 252 | + $model_id = $model->getName().self::ID_SUFFIX; |
|
| 253 | + $foreign_id = $foreign->getName().self::ID_SUFFIX; |
|
| 254 | 254 | |
| 255 | 255 | $relational_table = $this->modelManager->create( |
| 256 | - $model->getName() . '_' . $foreign->getName() |
|
| 256 | + $model->getName().'_'.$foreign->getName() |
|
| 257 | 257 | ); |
| 258 | 258 | $relational_table->$model_id = $id; |
| 259 | 259 | $relational_table->$foreign_id = $rel_id; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function insert(Model $model): mixed |
| 77 | 77 | { |
| 78 | - return $this->executeInTransaction(function () use ($model) { |
|
| 78 | + return $this->executeInTransaction(function() use ($model) { |
|
| 79 | 79 | if ($this->config->isUsingUUID()) { |
| 80 | 80 | $model->set(self::ID_COLUMN, Uuid::uuid4()->toString()); |
| 81 | 81 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function update(Model $model): mixed |
| 100 | 100 | { |
| 101 | - return $this->executeInTransaction(function () use ($model) { |
|
| 101 | + return $this->executeInTransaction(function() use ($model) { |
|
| 102 | 102 | $this->connection->update( |
| 103 | 103 | $model->getName(), |
| 104 | 104 | $model->getSelfProperties(), |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function delete(Model $model): mixed |
| 115 | 115 | { |
| 116 | - return $this->executeInTransaction(function () use ($model) { |
|
| 116 | + return $this->executeInTransaction(function() use ($model) { |
|
| 117 | 117 | $this->connection->delete( |
| 118 | 118 | $model->getName(), |
| 119 | 119 | [self::ID_COLUMN => $model->getId()] |
@@ -127,11 +127,11 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | public function getById(string $table, mixed $id): ?Model |
| 129 | 129 | { |
| 130 | - return $this->executeInTransaction(function () use ($table, $id) { |
|
| 130 | + return $this->executeInTransaction(function() use ($table, $id) { |
|
| 131 | 131 | return $this->createQueryBuilder() |
| 132 | 132 | ->select(self::ALL_COLUMNS) |
| 133 | 133 | ->from($table, self::DEFAULT_ALIAS) |
| 134 | - ->where(self::DEFAULT_ALIAS . '.' . self::ID_COLUMN . ' = ?') |
|
| 134 | + ->where(self::DEFAULT_ALIAS.'.'.self::ID_COLUMN.' = ?') |
|
| 135 | 135 | ->setParameter(0, $id) |
| 136 | 136 | ->first(); |
| 137 | 137 | }); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public function getAll(string $tableName): Collection |
| 144 | 144 | { |
| 145 | - return $this->executeInTransaction(function () use ($tableName) { |
|
| 145 | + return $this->executeInTransaction(function() use ($tableName) { |
|
| 146 | 146 | return $this->createQueryBuilder() |
| 147 | 147 | ->select(self::ALL_COLUMNS) |
| 148 | 148 | ->from($tableName, self::DEFAULT_ALIAS) |