Skip to content

Commit 56c9005

Browse files
KJ-Quinngithub-actions[bot]
authored andcommitted
Fix styling
1 parent 939c13c commit 56c9005

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

src/AllowedField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Spatie\QueryBuilder;
44

55
use Illuminate\Support\Collection;
6-
use Spatie\QueryBuilder\Filters\Filter;
76

87
class AllowedField
98
{
@@ -28,6 +27,7 @@ public static function setFilterArrayValueDelimiter(string $delimiter = null): v
2827
public static function partial(string $name, $internalNames = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): self
2928
{
3029
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
30+
3131
return new static($name, $internalNames);
3232
}
3333

src/App/Console/Commands/CacheForeignKeys.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
class CacheForeignKeys extends Command
1414
{
15-
1615
protected $signature = 'query-builder:cache-foreign-keys';
1716

1817
protected $description = 'Cache foreign keys for the QueryBuilder package.';

src/Concerns/AddsFieldsToQuery.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Illuminate\Support\Collection;
66
use Illuminate\Support\Str;
77
use Spatie\QueryBuilder\AllowedField;
8-
use Spatie\QueryBuilder\App\Console\Commands\CacheForeignKeys;
98
use Spatie\QueryBuilder\Exceptions\AllowedFieldsMustBeCalledBeforeAllowedIncludes;
109
use Spatie\QueryBuilder\Exceptions\InvalidFieldQuery;
1110
use Spatie\QueryBuilder\Exceptions\UnknownIncludedFieldsQuery;
@@ -47,7 +46,7 @@ protected function addRequestedModelFieldsToQuery(): void
4746

4847
$modelFields = $this->allowedFields->mapWithKeys(function (AllowedField $field) {
4948
return [
50-
$field->getName() => $field->getInternalNames()->toArray()
49+
$field->getName() => $field->getInternalNames()->toArray(),
5150
];
5251
});
5352

@@ -82,11 +81,11 @@ public function getRequestedFieldsForRelatedTable(string $relation): array
8281
return [$table => $fields];
8382
})->get($table);
8483

85-
if (!$fields) {
84+
if (! $fields) {
8685
return [];
8786
}
8887

89-
if (!$this->allowedFields instanceof Collection) {
88+
if (! $this->allowedFields instanceof Collection) {
9089
// We have requested fields but no allowed fields (yet?)
9190
throw new UnknownIncludedFieldsQuery($fields);
9291
}
@@ -119,7 +118,7 @@ protected function prependFieldsWithTableName(array $fields, string $tableName):
119118

120119
protected function prependField(string $field, ?string $table = null): string
121120
{
122-
if (!$table) {
121+
if (! $table) {
123122
$table = $this->getModel()->getTable();
124123
}
125124

src/Mappings/Column.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Column
1010
* @param string $name
1111
* @return void
1212
*/
13-
function __construct(string $name)
13+
public function __construct(string $name)
1414
{
1515
$this->name = $name;
1616
}

src/QueryBuilderRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function fields(): Collection
6666

6767
$data = $this->getRequestData($fieldsParameterName);
6868

69-
if (!$data) {
69+
if (! $data) {
7070
return collect();
7171
}
7272

0 commit comments

Comments
 (0)