@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * @var SelectEntity|null |
37 | 37 | */ |
38 | - private SelectEntity|null $selectEntity = null; |
|
38 | + private SelectEntity | null $selectEntity = null; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * @param AbstractFacade $dbFacade |
@@ -116,11 +116,9 @@ discard block |
||
116 | 116 | $value = $this->selectEntity->queryOptions["columns"][$valueKey] ?? []; |
117 | 117 | |
118 | 118 | $fun = $value["fun"] ?? ''; |
119 | - $fieldKey = !$this->selectEntity->select ? $key : |
|
120 | - ($value["col"] ?? current($this->selectEntity->select)); |
|
119 | + $fieldKey = !$this->selectEntity->select ? $key : ($value["col"] ?? current($this->selectEntity->select)); |
|
121 | 120 | $field = $this->selectEntity->fields[$fieldKey]; |
122 | - $name = !$field ? ($fun ? "*" : $key) : |
|
123 | - $this->admin->fieldName($field, $rank); |
|
121 | + $name = !$field ? ($fun ? "*" : $key) : $this->admin->fieldName($field, $rank); |
|
124 | 122 | |
125 | 123 | return [$fun, $name, $field]; |
126 | 124 | } |
@@ -246,8 +244,7 @@ discard block |
||
246 | 244 | private function getRowIdMd5Key(string $key, string $collation): string |
247 | 245 | { |
248 | 246 | return $this->driver->jush() != 'sql' || |
249 | - preg_match("~^utf8~", $collation) ? $key : |
|
250 | - "CONVERT($key USING " . $this->driver->charset() . ")"; |
|
247 | + preg_match("~^utf8~", $collation) ? $key : "CONVERT($key USING " . $this->driver->charset() . ")"; |
|
251 | 248 | } |
252 | 249 | |
253 | 250 | /** |
@@ -366,8 +363,8 @@ discard block |
||
366 | 363 | $query = $this->driver->getRowCountQuery($table, |
367 | 364 | $this->selectEntity->where, $this->hasGroupsInFields(), |
368 | 365 | $this->selectEntity->group); |
369 | - return (int)$this->driver->result($query); |
|
370 | - } catch(Exception $_) { |
|
366 | + return (int) $this->driver->result($query); |
|
367 | + } catch (Exception $_) { |
|
371 | 368 | return -1; |
372 | 369 | } |
373 | 370 | } |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $col = $value['col']; |
287 | 287 | $prefix = ''; |
288 | 288 | if ($op === 'FIND_IN_SET') { |
289 | - $prefix = $op .'(' . $this->driver->quote($value['val']) . ', '; |
|
289 | + $prefix = $op . '(' . $this->driver->quote($value['val']) . ', '; |
|
290 | 290 | } |
291 | 291 | $condition = $this->getWhereCondition($value, $fields); |
292 | 292 | if ($col !== '') { |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | */ |
316 | 316 | private function getMatchExpression(IndexEntity $index, int $i): string |
317 | 317 | { |
318 | - $columns = array_map(function ($column) { |
|
318 | + $columns = array_map(function($column) { |
|
319 | 319 | return $this->driver->escapeId($column); |
320 | 320 | }, $index->columns); |
321 | 321 | $match = $this->driver->quote($this->utils->input->values['fulltext'][$i]); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | } |
340 | 340 | } |
341 | 341 | foreach ((array) $this->utils->input->values['where'] as $value) { |
342 | - if (($value['col'] !== '' || $value['val'] !== '') && |
|
342 | + if (($value['col'] !== '' || $value['val'] !== '') && |
|
343 | 343 | in_array($value['op'], $this->driver->operators())) { |
344 | 344 | $selectEntity->where[] = $this |
345 | 345 | ->getSelectExpression($value, $selectEntity->fields); |
@@ -105,7 +105,7 @@ |
||
105 | 105 | /** |
106 | 106 | * @var string|null |
107 | 107 | */ |
108 | - public string|null $error = null; |
|
108 | + public string | null $error = null; |
|
109 | 109 | |
110 | 110 | /** |
111 | 111 | * @var TableSelectEntity |
@@ -145,8 +145,7 @@ |
||
145 | 145 | } |
146 | 146 | if ($this->isMail($value)) { |
147 | 147 | return '<a href="' . $this->utils->html("mailto:$value") . '">' . $value . '</a>'; |
148 | - } |
|
149 | - elseif ($this->isUrl($value)) { |
|
148 | + } elseif ($this->isUrl($value)) { |
|
150 | 149 | // IE 11 and all modern browsers hide referrer |
151 | 150 | return '<a href="' . $this->utils->html($value) . '"' . $this->blankTarget() . '>' . $value . '</a>'; |
152 | 151 | } |