@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | return $result->fetchAll(_PDO::FETCH_ASSOC); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - public function one(string $table, array $conditions, array $options = []): ?array |
|
| 79 | + public function one(string $table, array $conditions, array $options = []): ? array |
|
| 80 | 80 | { |
| 81 | 81 | $result = $this->find($table, $conditions, $options); |
| 82 | 82 | $result = iterator_to_array($result); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | if (empty($conditions)) { |
| 122 | 122 | return ""; |
| 123 | 123 | } |
| 124 | - $fun = function ($o, $v) { |
|
| 124 | + $fun = function($o, $v) { |
|
| 125 | 125 | return "{$o}{$v} = :c_{$v}"; |
| 126 | 126 | }; |
| 127 | 127 | $where = array_reduce(array_keys($conditions), $fun, ""); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | private function data(array $data): string |
| 188 | 188 | { |
| 189 | - $fun = function ($o, $v) { |
|
| 189 | + $fun = function($o, $v) { |
|
| 190 | 190 | return "{$o}{$v} = :d_{$v}"; |
| 191 | 191 | }; |
| 192 | 192 | return (string)array_reduce(array_keys($data), $fun, ""); |