From 94ba703ea7b93aa8bff2a39b657c3e03bd503c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 17 Sep 2024 06:28:58 +0000 Subject: [PATCH] Fix typos --- src/Support/Fields.php | 2 +- src/Support/Includes.php | 2 +- tests/Feature/AttributesTest.php | 2 +- tests/Feature/RelationshipsTest.php | 2 +- tests/Unit/LinkTest.php | 2 +- tests/Unit/Support/FieldsTest.php | 2 +- tests/Unit/Support/IncludesTest.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Support/Fields.php b/src/Support/Fields.php index 3dc3ce9..b62582c 100644 --- a/src/Support/Fields.php +++ b/src/Support/Fields.php @@ -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 !== ''); diff --git a/src/Support/Includes.php b/src/Support/Includes.php index 23347af..4c31111 100644 --- a/src/Support/Includes.php +++ b/src/Support/Includes.php @@ -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 !== ''); diff --git a/tests/Feature/AttributesTest.php b/tests/Feature/AttributesTest.php index b8f87db..2baf80e 100644 --- a/tests/Feature/AttributesTest.php +++ b/tests/Feature/AttributesTest.php @@ -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.', ]); } diff --git a/tests/Feature/RelationshipsTest.php b/tests/Feature/RelationshipsTest.php index 7244e45..dbe561d 100644 --- a/tests/Feature/RelationshipsTest.php +++ b/tests/Feature/RelationshipsTest.php @@ -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.', ]); } diff --git a/tests/Unit/LinkTest.php b/tests/Unit/LinkTest.php index 111278b..177a265 100644 --- a/tests/Unit/LinkTest.php +++ b/tests/Unit/LinkTest.php @@ -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', []); diff --git a/tests/Unit/Support/FieldsTest.php b/tests/Unit/Support/FieldsTest.php index 2de997b..b81fcb4 100644 --- a/tests/Unit/Support/FieldsTest.php +++ b/tests/Unit/Support/FieldsTest.php @@ -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'); diff --git a/tests/Unit/Support/IncludesTest.php b/tests/Unit/Support/IncludesTest.php index 3a98eee..5a9bde9 100644 --- a/tests/Unit/Support/IncludesTest.php +++ b/tests/Unit/Support/IncludesTest.php @@ -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');