Skip to content

Commit 961a443

Browse files
authored
Merge pull request #3 from SecTheater/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2 parents 2367ea6 + d1b33fc commit 961a443

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/Commands/RegisterServiceDataTableCommand.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function replaceNamespace(&$stub, $name)
3434
{
3535
$modelName = $this->replaceModelName($this->argument('model'));
3636
$stub = str_replace(
37-
['NamespacedDummyModel', 'DummyNamespace', 'DummyModel', 'dummies'],
38-
[$this->repalceModelNamespace($this->argument('model')), $this->getNamespace($name), $modelName, strtolower(Str::plural($modelName))],
37+
[ 'NamespacedDummyModel', 'DummyNamespace', 'DummyModel', 'dummies' ],
38+
[ $this->repalceModelNamespace($this->argument('model')), $this->getNamespace($name), $modelName, strtolower(Str::plural($modelName)) ],
3939
$stub
4040
);
4141

src/Resources/BaseResource.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ abstract public function dataTable(): BaseDataTableService;
1818
*/
1919
public function rejectNullValues($resource)
2020
{
21-
return array_filter($resource, function ($value) {
22-
return ! is_null($value) || ! empty($value);
21+
return array_filter($resource, function($value) {
22+
return !is_null($value) || !empty($value);
2323
});
2424
}
2525

src/Traits/Creatable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trait Creatable
2020
*/
2121
public function create(array $data): ?Model
2222
{
23-
if (! $this->allowCreation) {
23+
if (!$this->allowCreation) {
2424
return null;
2525
}
2626

src/Traits/Deletable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait Deletable
1919
public function destroy($ids): ?bool
2020
{
2121
$ids = (array) $ids;
22-
if (! $this->allowDeleting) {
22+
if (!$this->allowDeleting) {
2323
return null;
2424
}
2525

src/Traits/Updatable.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ trait Updatable
1919
* @param array $data
2020
* @return Model
2121
*/
22-
public function update(Model $model, array $data = []): ?Model
22+
public function update(Model $model, array $data = [ ]): ?Model
2323
{
24-
if (! $this->allowUpdating) {
24+
if (!$this->allowUpdating) {
2525
return null;
2626
}
2727

28-
return tap($model, function ($model) use ($data) {
28+
return tap($model, function($model) use ($data) {
2929
$model->update(Arr::only($data, $this->getUpdatableColumns()));
3030
});
3131
}

0 commit comments

Comments
 (0)