From bbbe23dc258aa426a2a74fb49055c7fd89a4d030 Mon Sep 17 00:00:00 2001 From: splitbrain <86426+splitbrain@users.noreply.github.com> Date: Mon, 25 Mar 2024 08:28:30 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Automatic=20code=20style=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Form/DropdownElement.php | 4 +--- bureaucracy_field.php | 30 +++++++++++++++--------------- helper/aliastextbox.php | 30 +++++++++++++++--------------- syntax/entry.php | 5 ++--- 4 files changed, 33 insertions(+), 36 deletions(-) diff --git a/Form/DropdownElement.php b/Form/DropdownElement.php index 7ee932e..5031151 100644 --- a/Form/DropdownElement.php +++ b/Form/DropdownElement.php @@ -135,9 +135,7 @@ protected function mainElementHTML() $html = ''; diff --git a/bureaucracy_field.php b/bureaucracy_field.php index b4fc71d..f1007c5 100644 --- a/bureaucracy_field.php +++ b/bureaucracy_field.php @@ -8,6 +8,9 @@ */ class syntax_plugin_bureaucracy_field_dataplugin extends helper_plugin_bureaucracy_field { + public $opt; + public $tpl; + public $error; private $args = []; private $additional; @@ -113,21 +116,18 @@ public function renderfield($params, Doku_Form $form, $formid) $this->additional['required'] = 'required'; } - $form->addElement(call_user_func_array( - 'form_makeListboxField', - $this->_parse_tpl( - [ - '@@NAME@@[]', - $params['args'], - $params['value'], - '@@DISPLAY@@', - '', - '@@CLASS@@', - $this->additional - ], - $params - ) - )); + $form->addElement(form_makeListboxField(...$this->_parse_tpl( + [ + '@@NAME@@[]', + $params['args'], + $params['value'], + '@@DISPLAY@@', + '', + '@@CLASS@@', + $this->additional + ], + $params + ))); } } diff --git a/helper/aliastextbox.php b/helper/aliastextbox.php index 010e791..ea286a9 100644 --- a/helper/aliastextbox.php +++ b/helper/aliastextbox.php @@ -8,6 +8,9 @@ */ class helper_plugin_data_aliastextbox extends helper_plugin_bureaucracy_field { + public $opt; + public $tpl; + public $error; private $args; private $additional; @@ -108,21 +111,18 @@ public function renderfield($params, Doku_Form $form, $formid) $this->additional['required'] = 'required'; } - $form->addElement(call_user_func_array( - 'form_makeListboxField', - $this->_parse_tpl( - [ - '@@NAME@@[]', - $params['args'], - $params['value'], - '@@DISPLAY@@', - '', - '@@CLASS@@', - $this->additional - ], - $params - ) - )); + $form->addElement(form_makeListboxField(...$this->_parse_tpl( + [ + '@@NAME@@[]', + $params['args'], + $params['value'], + '@@DISPLAY@@', + '', + '@@CLASS@@', + $this->additional + ], + $params + ))); } } diff --git a/syntax/entry.php b/syntax/entry.php index d5ea71d..cdb3ad4 100644 --- a/syntax/entry.php +++ b/syntax/entry.php @@ -303,9 +303,8 @@ public function saveData($data, $id, $title) * @fixme replace this madness * @return bool|mixed */ - public function replaceQuery() + public function replaceQuery(...$args) { - $args = func_get_args(); $argc = func_num_args(); if ($argc > 1) { @@ -320,7 +319,7 @@ public function replaceQuery() $sqlite = $this->dthlp->getDB(); if (!$sqlite) return false; - return call_user_func_array(array(&$sqlite, 'query'), $args); + return $sqlite->query(...$args); }