Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Support/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function parse(Request $request, string $resourceType, bool $minimalAttri
$fields = $typeFields[$resourceType] ?? '';

if (! is_string($fields)) {
throw new HttpException(400, 'The fields parameter value must be a comma seperated list of attributes.');
throw new HttpException(400, 'The fields parameter value must be a comma separated list of attributes.');
}

return array_filter(explode(',', $fields), fn (string $value): bool => $value !== '');
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private function all(Request $request)
$includes = $request->query('include') ?? '';

if (is_array($includes)) {
throw new HttpException(400, 'The include parameter must be a comma seperated list of relationship paths.');
throw new HttpException(400, 'The include parameter must be a comma separated list of relationship paths.');
}

return Collection::make(explode(',', $includes))->filter(fn (string $include): bool => $include !== '');
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/AttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function testItThrowsWhenFieldsParameterIsNotAStringValue(): void

$response->assertStatus(400);
$response->assertExactJson([
'message' => 'The fields parameter value must be a comma seperated list of attributes.',
'message' => 'The fields parameter value must be a comma separated list of attributes.',
]);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/RelationshipsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function testItThrowsWhenTheIncludeQueryParameterIsAnArray(): void

$response->assertStatus(400);
$response->assertExactJson([
'message' => 'The include parameter must be a comma seperated list of relationship paths.',
'message' => 'The include parameter must be a comma separated list of relationship paths.',
]);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/LinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function testItSerializes(): void
$this->assertSame('{"href":"https:\/\/related.com","meta":{"expected":"meta"}}', $serialized);
}

public function testEmptyMetaIsExluded(): void
public function testEmptyMetaIsExcluded(): void
{
$link = Link::related('https://related.com', []);

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Support/FieldsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testItMustProvideStringForFields(): void
Fields::getInstance()->parse($request, 'foo', true);
$this->fail('Exception should have been thrown');
} catch (HttpException $e) {
$this->assertSame('The fields parameter value must be a comma seperated list of attributes.', $e->getMessage());
$this->assertSame('The fields parameter value must be a comma separated list of attributes.', $e->getMessage());
$this->assertSame(400, $e->getStatusCode());
} catch (Throwable) {
$this->fail('Http exception should have been thrown');
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Support/IncludesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function testItAbortsWhenIncludesIsNotAString(): void
Includes::getInstance()->forPrefix($request, '');
$this->fail('Exception should have been thrown');
} catch (HttpException $e) {
$this->assertSame('The include parameter must be a comma seperated list of relationship paths.', $e->getMessage());
$this->assertSame('The include parameter must be a comma separated list of relationship paths.', $e->getMessage());
$this->assertSame(400, $e->getStatusCode());
} catch (Throwable) {
$this->fail('Http exception should have been thrown');
Expand Down