@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | return $result->fetchAll(_PDO::FETCH_ASSOC); |
65 | 65 | } |
66 | 66 | |
67 | - public function one(string $table, array $conditions, array $options = []): ?array |
|
67 | + public function one(string $table, array $conditions, array $options = []): ? array |
|
68 | 68 | { |
69 | 69 | $result = $this->find($table, $conditions, $options); |
70 | 70 | $result = iterator_to_array($result); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | if (empty($conditions)) { |
110 | 110 | return ""; |
111 | 111 | } |
112 | - $fun = function ($o, $v) { |
|
112 | + $fun = function($o, $v) { |
|
113 | 113 | return "{$o}{$v} = :c_{$v}"; |
114 | 114 | }; |
115 | 115 | $where = array_reduce(array_keys($conditions), $fun, ""); |
@@ -174,13 +174,13 @@ discard block |
||
174 | 174 | |
175 | 175 | private function data(array $data): string |
176 | 176 | { |
177 | - $fun = function ($o, $v) { |
|
177 | + $fun = function($o, $v) { |
|
178 | 178 | return "{$o}{$v} = :d_{$v}"; |
179 | 179 | }; |
180 | 180 | return (string)array_reduce(array_keys($data), $fun, ""); |
181 | 181 | } |
182 | 182 | |
183 | - public function insert(string $table, array $data, array $options = []): ?string |
|
183 | + public function insert(string $table, array $data, array $options = []): ? string |
|
184 | 184 | { |
185 | 185 | $keys = implode(', ', array_keys($data)); |
186 | 186 | $data_phs = ':d_' . implode(', :d_', array_keys($data)); |