@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | public function query($query, array $params = []); |
15 | 15 | |
16 | - public function one(string $table, array $conditions, array $options = []):?array; |
|
16 | + public function one(string $table, array $conditions, array $options = []): ?array; |
|
17 | 17 | |
18 | 18 | public function find(string $table, array $conditions, array $options = []); |
19 | 19 |
@@ -81,11 +81,11 @@ |
||
81 | 81 | public static function find(array $conditions = [], array $options = []): \Generator |
82 | 82 | { |
83 | 83 | $conditions = self::filterByFields($conditions); |
84 | - $with = array_key_exists('with', $options) ? (array)$options['with'] : false; |
|
84 | + $with = array_key_exists('with', $options) ? (array) $options['with'] : false; |
|
85 | 85 | unset($options['with']); |
86 | 86 | $result = static::db()->find(static::table(), $conditions, $options); |
87 | 87 | $pk = static::pk(); |
88 | - $gen = function () use ($result, $pk, $with) { |
|
88 | + $gen = function() use ($result, $pk, $with) { |
|
89 | 89 | foreach ($result as $row) { |
90 | 90 | $model = new static($row); |
91 | 91 | if ($with) { |