@@ -88,10 +88,10 @@ |
||
88 | 88 | public function getById(string $table, mixed $id): ?Model |
89 | 89 | { |
90 | 90 | $query = (new QueryBuilder($this->connection, $this->modelManager)) |
91 | - ->select('*') |
|
92 | - ->from($table, 't') |
|
93 | - ->where('t.id = ?') |
|
94 | - ->setParameter(0, $id); |
|
91 | + ->select('*') |
|
92 | + ->from($table, 't') |
|
93 | + ->where('t.id = ?') |
|
94 | + ->setParameter(0, $id); |
|
95 | 95 | |
96 | 96 | return $query->first(); |
97 | 97 | } |
@@ -67,13 +67,13 @@ discard block |
||
67 | 67 | { |
68 | 68 | Event::subscribeTo( |
69 | 69 | '__arca.model.save.'.$this->connection->getConnectionId(), |
70 | - function ($model) { |
|
70 | + function($model) { |
|
71 | 71 | return $this->save($model); |
72 | 72 | } |
73 | 73 | ); |
74 | 74 | Event::subscribeTo( |
75 | 75 | '__arca.model.delete.'.$this->connection->getConnectionId(), |
76 | - function ($model) { |
|
76 | + function($model) { |
|
77 | 77 | return $this->delete($model); |
78 | 78 | } |
79 | 79 | ); |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * |
87 | 87 | * @return int|numeric-string |
88 | 88 | */ |
89 | - public function exec(string $sql, array $params = []): int|string |
|
89 | + public function exec(string $sql, array $params = []): int | string |
|
90 | 90 | { |
91 | 91 | return $this->connection->executeStatement($sql, $params); |
92 | 92 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | * |
78 | 78 | * @return int|numeric-string |
79 | 79 | */ |
80 | - public static function exec(string $sql): int|string |
|
80 | + public static function exec(string $sql): int | string |
|
81 | 81 | { |
82 | 82 | return self::getDB()->exec($sql); |
83 | 83 | } |
@@ -227,7 +227,7 @@ |
||
227 | 227 | * |
228 | 228 | * @throws Exception\InvalidModelException |
229 | 229 | */ |
230 | - private function createCollection(?Collection $collection, array|Collection $models): Collection |
|
230 | + private function createCollection(?Collection $collection, array | Collection $models): Collection |
|
231 | 231 | { |
232 | 232 | if (is_null($collection)) { |
233 | 233 | $collection = Collection::fromIterable([]); |