@@ -10,7 +10,6 @@ |
||
10 | 10 | class ModelManager { |
11 | 11 | /** |
12 | 12 | * Creates and return models |
13 | - |
|
14 | 13 | */ |
15 | 14 | function create(string $name): Model |
16 | 15 | { |
@@ -67,15 +67,15 @@ |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | - * Get single record by id |
|
71 | - * |
|
72 | - */ |
|
70 | + * Get single record by id |
|
71 | + * |
|
72 | + */ |
|
73 | 73 | public function getById(Model $model, mixed $id): Model |
74 | 74 | { |
75 | 75 | $query = (new QueryBuilder($this->connection)) |
76 | - ->select('*') |
|
77 | - ->from($model->getName(), 't') |
|
78 | - ->where("t.id = '".$id."'"); |
|
76 | + ->select('*') |
|
77 | + ->from($model->getName(), 't') |
|
78 | + ->where("t.id = '".$id."'"); |
|
79 | 79 | $result = $this->connection->executeQuery($query)->fetchAssociative(); |
80 | 80 | $result = $result ? $result : []; |
81 | 81 | return $model->setProperties($result)->setLoaded(); |