Skip to content

Commit 2367ea6

Browse files
authored
Merge pull request #2 from SecTheater/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2 parents a4e446f + e37ecbb commit 2367ea6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Services/BaseDataTableService.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function builder(): Builder
3737
*/
3838
static $builder = null;
3939

40-
if (! is_null($builder) && ! app()->environment('testing')) {
40+
if (!is_null($builder) && !app()->environment('testing')) {
4141
return $builder;
4242
}
4343
$builder = $this->query()->newQuery();
@@ -52,7 +52,7 @@ public function getColumnsWithoutPrimaryKey($columns)
5252
{
5353
$primaryKey = $this->getModel()->getKeyName();
5454

55-
return array_filter($columns, function ($column) use ($primaryKey) {
55+
return array_filter($columns, function($column) use ($primaryKey) {
5656
return $primaryKey !== $column;
5757
});
5858
}
@@ -68,7 +68,7 @@ public function getCustomColumnNames(): array
6868
return $model->getCustomColumnNames();
6969
}
7070

71-
return [];
71+
return [ ];
7272
}
7373

7474
/**
@@ -97,7 +97,7 @@ public function getModel(): Model
9797
* @var mixed
9898
*/
9999
static $model = null;
100-
if (! is_null($model)) {
100+
if (!is_null($model)) {
101101
return $model;
102102
}
103103

@@ -135,7 +135,7 @@ public function getRecords(Request $request = null, callable $callback = null):
135135
$request->limit ?? -1
136136
)->get();
137137
} catch (QueryException $e) {
138-
return collect([]);
138+
return collect([ ]);
139139
}
140140
}
141141

@@ -210,7 +210,7 @@ public function response(callable $callback = null): array
210210
*/
211211
protected function buildSearchQuery(Builder $builder, Request $request): Builder
212212
{
213-
['operator' => $operator, 'value' => $value] = $this->resolveQueryParts($request->operator, $request->value);
213+
[ 'operator' => $operator, 'value' => $value ] = $this->resolveQueryParts($request->operator, $request->value);
214214

215215
throw_unless(in_array($request->column, $this->getDisplayableColumns()), InvalidColumnSearchException::class);
216216

@@ -235,7 +235,7 @@ protected function getDatabaseColumnNames(): array
235235
*/
236236
protected function hasSearchQuery(Request $request): bool
237237
{
238-
return count(array_filter($request->only(['column', 'operator', 'value']))) === 3;
238+
return count(array_filter($request->only([ 'column', 'operator', 'value' ]))) === 3;
239239
}
240240

241241
/**

0 commit comments

Comments
 (0)