@@ -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 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | function setConnection(Connection $connection): void |
35 | 35 | { |
36 | - $this->connection = $connection; |
|
36 | + $this->connection = $connection; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | } |
40 | 40 | \ No newline at end of file |
@@ -5,10 +5,10 @@ |
||
5 | 5 | use Scrawler\Arca\Collection; |
6 | 6 | |
7 | 7 | trait Iterator{ |
8 | - /** |
|
9 | - * Get all properties in array form |
|
10 | - * @return array<mixed> |
|
11 | - */ |
|
8 | + /** |
|
9 | + * Get all properties in array form |
|
10 | + * @return array<mixed> |
|
11 | + */ |
|
12 | 12 | public function toArray(): array |
13 | 13 | { |
14 | 14 | $props = $this->getProperties(); |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | use Scrawler\Arca\Model; |
5 | 5 | trait Setter{ |
6 | 6 | |
7 | - /** |
|
8 | - * Set all properties of model via array |
|
9 | - * @param array<mixed> $properties |
|
10 | - * @return Model |
|
11 | - */ |
|
7 | + /** |
|
8 | + * Set all properties of model via array |
|
9 | + * @param array<mixed> $properties |
|
10 | + * @return Model |
|
11 | + */ |
|
12 | 12 | public function setProperties(array $properties): Model |
13 | 13 | { |
14 | 14 | foreach ($properties as $key => $value) { |
@@ -17,11 +17,11 @@ discard block |
||
17 | 17 | return $this; |
18 | 18 | } |
19 | 19 | |
20 | - /** |
|
21 | - * Set all properties of model loaded via database |
|
22 | - * @param array<mixed> $properties |
|
23 | - * @return Model |
|
24 | - */ |
|
20 | + /** |
|
21 | + * Set all properties of model loaded via database |
|
22 | + * @param array<mixed> $properties |
|
23 | + * @return Model |
|
24 | + */ |
|
25 | 25 | public function setLoadedProperties(array $properties): Model |
26 | 26 | { |
27 | 27 | $this->__properties['all'] = $properties; |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | return $this; |
34 | 34 | } |
35 | 35 | |
36 | - /** |
|
37 | - * call when model is loaded from database |
|
38 | - * @return Model |
|
39 | - */ |
|
36 | + /** |
|
37 | + * call when model is loaded from database |
|
38 | + * @return Model |
|
39 | + */ |
|
40 | 40 | public function setLoaded(): Model |
41 | 41 | { |
42 | 42 | $this->__meta['is_loaded'] = true; |
@@ -69,17 +69,17 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | - * Get single record by id |
|
73 | - * @param string $table |
|
74 | - * @param mixed $id |
|
75 | - */ |
|
72 | + * Get single record by id |
|
73 | + * @param string $table |
|
74 | + * @param mixed $id |
|
75 | + */ |
|
76 | 76 | public function getById(string $table, mixed $id): Model|null |
77 | 77 | { |
78 | 78 | $query = (new QueryBuilder($this->connection,$this->modelManager)) |
79 | - ->select('*') |
|
80 | - ->from($table, 't') |
|
81 | - ->where("t.id = ?") |
|
82 | - ->setParameter(0, $id); |
|
79 | + ->select('*') |
|
80 | + ->from($table, 't') |
|
81 | + ->where("t.id = ?") |
|
82 | + ->setParameter(0, $id); |
|
83 | 83 | |
84 | 84 | return $query->first(); |
85 | 85 | } |