Skip to content

Commit

Permalink
馃 Automatic code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Mar 5, 2024
1 parent 78ba3cf commit e062c24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions SQLiteDB.php
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
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 e062c24

Please sign in to comment.