mirror of
https://github.com/cosmocode/sqlite.git
synced 2025-08-03 16:22:47 +00:00
Merge pull request #88 from cosmocode/bot/autofix
🤖 Automatic code style fixes
This commit is contained in:
@ -245,9 +245,7 @@ class SQLiteDB
|
|||||||
*/
|
*/
|
||||||
public function saveRecord($table, $data, $replace = true)
|
public function saveRecord($table, $data, $replace = true)
|
||||||
{
|
{
|
||||||
$columns = array_map(function ($column) {
|
$columns = array_map(static fn($column) => '"' . $column . '"', array_keys($data));
|
||||||
return '"' . $column . '"';
|
|
||||||
}, array_keys($data));
|
|
||||||
$values = array_values($data);
|
$values = array_values($data);
|
||||||
$placeholders = array_pad([], count($columns), '?');
|
$placeholders = array_pad([], count($columns), '?');
|
||||||
|
|
||||||
|
@ -158,11 +158,8 @@ class helper_plugin_sqlite extends Plugin
|
|||||||
*
|
*
|
||||||
* @param string ...$args - the arguments of query(), the first is the sql and others are values
|
* @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
|
// clear the cache
|
||||||
$this->data = null;
|
$this->data = null;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user