Skip to content

Commit b8d3247

Browse files
committed
Code style fixes
1 parent 4f8ee70 commit b8d3247

File tree

4 files changed

+24
-5
lines changed

4 files changed

+24
-5
lines changed

meta/AccessTableGlobal.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function getSingleSql()
5757
$vals = array_merge($this->getSingleNoninputValues(), $this->singleValues);
5858
$rid = $this->getRid() ?: "(SELECT (COALESCE(MAX(rid), 0 ) + 1) FROM $this->stable)";
5959

60-
return "REPLACE INTO $this->stable (rid, $cols)
60+
return "REPLACE INTO $this->stable (rid, $cols)
6161
VALUES ($rid," . trim(str_repeat('?,', count($vals)), ',') . ');';
6262
}
6363

@@ -75,7 +75,11 @@ protected function getMultiSql()
7575
protected function validateTypeData($data)
7676
{
7777
// we do not store completely empty rows
78-
$isempty = array_reduce($data, static fn($isempty, $cell) => $isempty && ($cell === '' || $cell === [] || $cell === null), true);
78+
$isempty = array_reduce(
79+
$data,
80+
static fn($isempty, $cell) => $isempty && ($cell === '' || $cell === [] || $cell === null),
81+
true
82+
);
7983

8084
return !$isempty;
8185
}

meta/SchemaBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,15 @@ protected function migrateSingleToMulti($table, $colref)
229229
continue;
230230
}
231231
$valueString[] = "(?, ?, ?, ?, ?, ?)";
232-
$arguments = [...$arguments, $colref, $values['pid'], $values['rev'], $values['published'], 1, $values['value']];
232+
$arguments = [
233+
...$arguments,
234+
$colref,
235+
$values['pid'],
236+
$values['rev'],
237+
$values['published'],
238+
1,
239+
$values['value']
240+
];
233241
}
234242
if ($valueString === []) {
235243
return;

meta/Search.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,11 @@ public function execute()
460460
$this->result_pids = [];
461461
$result = [];
462462
$cursor = -1;
463-
$pageidAndRevOnly = array_reduce($this->columns, static fn($pageidAndRevOnly, Column $col) => $pageidAndRevOnly && ($col->getTid() == 0), true);
463+
$pageidAndRevOnly = array_reduce(
464+
$this->columns,
465+
static fn($pageidAndRevOnly, Column $col) => $pageidAndRevOnly && ($col->getTid() == 0),
466+
true
467+
);
464468
while ($row = $res->fetch(\PDO::FETCH_ASSOC)) {
465469
$cursor++;
466470
if ($cursor < $this->range_begin) continue;

remote.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ public function getAggregationData(array $schemas, array $cols, array $filter =
141141
{
142142
$schemaLine = 'schema: ' . implode(', ', $schemas);
143143
$columnLine = 'cols: ' . implode(', ', $cols);
144-
$filterLines = array_map(static fn($filter) => 'filter' . $filter['logic'] . ': ' . $filter['condition'], $filter);
144+
$filterLines = array_map(
145+
static fn($filter) => 'filter' . $filter['logic'] . ': ' . $filter['condition'],
146+
$filter
147+
);
145148
$sortLine = 'sort: ' . $sort;
146149
// schemas, cols, REV?, filter, order
147150

0 commit comments

Comments
 (0)