@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | foreach (self::$events[$eventname] as $key => $weight) { |
| 44 | 44 | foreach ($weight as $callback) { |
| 45 | - call_user_func_array($callback, $params); |
|
| 45 | + call_user_func_array($callback, $params); |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | function setConnection(Connection $connection) |
| 23 | 23 | { |
| 24 | - $this->connection = $connection; |
|
| 24 | + $this->connection = $connection; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -69,15 +69,15 @@ |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | - * Get single record by id |
|
| 73 | - * |
|
| 74 | - */ |
|
| 72 | + * Get single record by id |
|
| 73 | + * |
|
| 74 | + */ |
|
| 75 | 75 | public function getById($table, mixed $id): Model |
| 76 | 76 | { |
| 77 | 77 | $query = (new QueryBuilder($this->connection,$this->modelManager)) |
| 78 | - ->select('*') |
|
| 79 | - ->from($table, 't') |
|
| 80 | - ->where("t.id = '".$id."'"); |
|
| 78 | + ->select('*') |
|
| 79 | + ->from($table, 't') |
|
| 80 | + ->where("t.id = '".$id."'"); |
|
| 81 | 81 | $result = $this->connection->executeQuery($query)->fetchAssociative(); |
| 82 | 82 | $result = $result ? $result : []; |
| 83 | 83 | return $this->modelManager->create($table)->setProperties($result)->setLoaded(); |