Skip to content

Commit

Permalink
Merge pull request #88 from cosmocode/bot/autofix
Browse files Browse the repository at this point in the history
🤖 Automatic code style fixes
  • Loading branch information
splitbrain authored Mar 5, 2024
2 parents 78ba3cf + e062c24 commit cd6717d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions SQLiteDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ public function queryRecord($sql, ...$params)
*/
public function saveRecord($table, $data, $replace = true)
{
$columns = array_map(function ($column) {
return '"' . $column . '"';
}, array_keys($data));
$columns = array_map(static fn($column) => '"' . $column . '"', array_keys($data));
$values = array_values($data);
$placeholders = array_pad([], count($columns), '?');

Expand Down
5 changes: 1 addition & 4 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,8 @@ public function storeEntry($table, $entry)
*
* @param string ...$args - the arguments of query(), the first is the sql and others are values
*/
public function query()
public function query(...$args)
{
// get function arguments
$args = func_get_args();

// clear the cache
$this->data = null;

Expand Down

0 comments on commit cd6717d

Please sign in to comment.