Skip to content

Commit bbbe23d

Browse files
splitbraingithub-actions[bot]
authored andcommitted
🤖 Automatic code style fixes
1 parent a388be1 commit bbbe23d

File tree

4 files changed

+33
-36
lines changed

4 files changed

+33
-36
lines changed

‎Form/DropdownElement.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ protected function mainElementHTML()
135135
$html = '<select ' . buildAttributes($attr) . '>';
136136
$html = array_reduce(
137137
$this->optGroups,
138-
function ($html, OptGroup $optGroup) {
139-
return $html . $optGroup->toHTML();
140-
},
138+
static fn($html, OptGroup $optGroup) => $html . $optGroup->toHTML(),
141139
$html
142140
);
143141
$html .= '</select>';

‎bureaucracy_field.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
*/
99
class syntax_plugin_bureaucracy_field_dataplugin extends helper_plugin_bureaucracy_field
1010
{
11+
public $opt;
12+
public $tpl;
13+
public $error;
1114
private $args = [];
1215
private $additional;
1316

@@ -113,21 +116,18 @@ public function renderfield($params, Doku_Form $form, $formid)
113116
$this->additional['required'] = 'required';
114117
}
115118

116-
$form->addElement(call_user_func_array(
117-
'form_makeListboxField',
118-
$this->_parse_tpl(
119-
[
120-
'@@NAME@@[]',
121-
$params['args'],
122-
$params['value'],
123-
'@@DISPLAY@@',
124-
'',
125-
'@@CLASS@@',
126-
$this->additional
127-
],
128-
$params
129-
)
130-
));
119+
$form->addElement(form_makeListboxField(...$this->_parse_tpl(
120+
[
121+
'@@NAME@@[]',
122+
$params['args'],
123+
$params['value'],
124+
'@@DISPLAY@@',
125+
'',
126+
'@@CLASS@@',
127+
$this->additional
128+
],
129+
$params
130+
)));
131131
}
132132
}
133133

‎helper/aliastextbox.php

+15-15
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
*/
99
class helper_plugin_data_aliastextbox extends helper_plugin_bureaucracy_field
1010
{
11+
public $opt;
12+
public $tpl;
13+
public $error;
1114
private $args;
1215
private $additional;
1316

@@ -108,21 +111,18 @@ public function renderfield($params, Doku_Form $form, $formid)
108111
$this->additional['required'] = 'required';
109112
}
110113

111-
$form->addElement(call_user_func_array(
112-
'form_makeListboxField',
113-
$this->_parse_tpl(
114-
[
115-
'@@NAME@@[]',
116-
$params['args'],
117-
$params['value'],
118-
'@@DISPLAY@@',
119-
'',
120-
'@@CLASS@@',
121-
$this->additional
122-
],
123-
$params
124-
)
125-
));
114+
$form->addElement(form_makeListboxField(...$this->_parse_tpl(
115+
[
116+
'@@NAME@@[]',
117+
$params['args'],
118+
$params['value'],
119+
'@@DISPLAY@@',
120+
'',
121+
'@@CLASS@@',
122+
$this->additional
123+
],
124+
$params
125+
)));
126126
}
127127
}
128128

‎syntax/entry.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,8 @@ public function saveData($data, $id, $title)
303303
* @fixme replace this madness
304304
* @return bool|mixed
305305
*/
306-
public function replaceQuery()
306+
public function replaceQuery(...$args)
307307
{
308-
$args = func_get_args();
309308
$argc = func_num_args();
310309

311310
if ($argc > 1) {
@@ -320,7 +319,7 @@ public function replaceQuery()
320319
$sqlite = $this->dthlp->getDB();
321320
if (!$sqlite) return false;
322321

323-
return call_user_func_array(array(&$sqlite, 'query'), $args);
322+
return $sqlite->query(...$args);
324323
}
325324

326325

0 commit comments

Comments
 (0)