Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryk authored and github-actions[bot] committed Jan 12, 2025
1 parent 85c0a5a commit 34d05d9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/restify.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

'middleware' => [
'api',
//'auth:sanctum',
// 'auth:sanctum',
DispatchRestifyStartingEvent::class,
AuthorizeRestify::class,
],
Expand Down
2 changes: 1 addition & 1 deletion src/Filters/HasMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function getLikeOperator(): string
return '=';
}

return 'LIKE'; //TODO: ilike support
return 'LIKE'; // TODO: ilike support
}

public function getLikeValue(string $value): string
Expand Down
2 changes: 1 addition & 1 deletion src/Generators/DatabaseGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function string(string $column): string
public function integer(Column $columnDefinition, $column): ?int
{
if ($columnDefinition->getAutoincrement() === true) {
//primary key
// primary key
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/RestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public function respond($response = null): JsonResponse
}
}

//according with https://jsonapi.org/format/#document-top-level these fields should be in data:
// according with https://jsonapi.org/format/#document-top-level these fields should be in data:
foreach (['attributes', 'relationships', 'type', 'id'] as $item) {
if (isset($this->{$item})) {
$response->data->{$item} = $this->{$item};
Expand Down Expand Up @@ -414,7 +414,7 @@ public function forRepository(Repository $repository, $withRelations = false): s

public static function beforeRespond($response)
{
//The members data and errors MUST NOT coexist in the same document. - https://jsonapi.org/format/#introduction
// The members data and errors MUST NOT coexist in the same document. - https://jsonapi.org/format/#introduction
if (isset($response->errors)) {
unset($response->data);

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Requests/Concerns/InteractWithRepositories.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function isViaRepository(): bool
$parentRepository = $this->route('parentRepository');
$parentRepositoryId = $this->route('parentRepositoryId');

//TODO: Find another implementation for prefixes:
// TODO: Find another implementation for prefixes:
$matchSomePrefixes = collect(Restify::$repositories)->some(fn (
$repository
) => $repository::prefix() === "$parentRepository/$parentRepositoryId");
Expand Down
2 changes: 1 addition & 1 deletion tests/Fields/HasManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public function test_it_validates_fields_when_storing_related(): void
{
$userId = $this->mockUsers()->first()->id;
$this->postJson(UserWithPosts::route("/{$userId}/posts"), [
/*'title' => 'Wew',*/
/* 'title' => 'Wew', */
])->assertStatus(422);
}
}
Expand Down

0 comments on commit 34d05d9

Please sign in to comment.