Skip to content

Commit d1108e2

Browse files
authored
Merge pull request #2779 from yajra/analysis-QMbDn3
Apply fixes from StyleCI
2 parents 07fedfe + 590ead1 commit d1108e2

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

src/CollectionDataTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ protected function globalSearch($keyword)
231231
$data = $this->serialize($row);
232232
foreach ($this->request->searchableColumnIndex() as $index) {
233233
$column = $this->getColumnName($index, 'sort');
234-
$value = Arr::get($data, $column);
234+
$value = Arr::get($data, $column);
235235
if (! $value || is_array($value)) {
236236
if (! is_numeric($value)) {
237237
continue;

src/DataTableAbstract.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -939,9 +939,9 @@ protected function setupKeyword($value)
939939
/**
940940
* Get column name to be use for filtering and sorting.
941941
*
942-
* @param int $index
943-
* @param string|null $type
944-
* @param bool $wantsAlias
942+
* @param int $index
943+
* @param string|null $type
944+
* @param bool $wantsAlias
945945
* @return string
946946
*/
947947
protected function getColumnName($index, $type = null, $wantsAlias = false)

src/Processors/DataProcessor.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,18 @@ protected function selectOnlyNeededColumns(array $data)
189189
{
190190
if (is_null($this->onlyColumns)) {
191191
return $data;
192-
} else {
193-
$results = [];
194-
foreach ($this->onlyColumns as $onlyColumn) {
195-
Arr::set($results, $onlyColumn, Arr::get($data, $onlyColumn));
196-
}
197-
foreach ($this->exceptions as $exception) {
198-
if ($column = Arr::get($data, $exception)) {
199-
Arr::set($results, $exception, $column);
200-
}
192+
}
193+
$results = [];
194+
foreach ($this->onlyColumns as $onlyColumn) {
195+
Arr::set($results, $onlyColumn, Arr::get($data, $onlyColumn));
196+
}
197+
foreach ($this->exceptions as $exception) {
198+
if ($column = Arr::get($data, $exception)) {
199+
Arr::set($results, $exception, $column);
201200
}
202-
203-
return $results;
204201
}
202+
203+
return $results;
205204
}
206205

207206
/**

src/QueryDataTable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,8 @@ protected function defaultOrdering()
674674
$this->applyOrderColumn($column, $orderable);
675675
} else {
676676
$nullsLastSql = $this->getNullsLastSql($column, $orderable['direction']);
677-
$normalSql = $this->wrap($column) . ' ' . $orderable['direction'];
678-
$sql = $this->nullsLast ? $nullsLastSql : $normalSql;
677+
$normalSql = $this->wrap($column) . ' ' . $orderable['direction'];
678+
$sql = $this->nullsLast ? $nullsLastSql : $normalSql;
679679
$this->query->orderByRaw($sql);
680680
}
681681
});

src/Utilities/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ public function keyword()
205205
/**
206206
* Get column identity from input or database.
207207
*
208-
* @param int $i
209-
* @param string|null $type
208+
* @param int $i
209+
* @param string|null $type
210210
* @return string
211211
*/
212212
public function columnName($i, $type = null)

0 commit comments

Comments
 (0)