From 04c6feba26f1455074e3a13afa6c1be4d7b06a6a Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Mon, 28 Oct 2024 12:00:13 -0600 Subject: [PATCH 01/11] phpcs Assets/Auth --- tests/Assets/Auth/AuthenticableMock.php | 2 ++ .../AuthenticableWithNonEmptyConstructorMock.php | 3 +++ tests/Assets/Auth/Passwords/UserMock.php | 12 ++++++------ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/Assets/Auth/AuthenticableMock.php b/tests/Assets/Auth/AuthenticableMock.php index 6a344306..653c3101 100644 --- a/tests/Assets/Auth/AuthenticableMock.php +++ b/tests/Assets/Auth/AuthenticableMock.php @@ -1,5 +1,7 @@ password = $passwords[0]; diff --git a/tests/Assets/Auth/Passwords/UserMock.php b/tests/Assets/Auth/Passwords/UserMock.php index f4c8fb8b..9df3794c 100644 --- a/tests/Assets/Auth/Passwords/UserMock.php +++ b/tests/Assets/Auth/Passwords/UserMock.php @@ -1,5 +1,7 @@ Date: Mon, 28 Oct 2024 12:01:24 -0600 Subject: [PATCH 02/11] phpcs Assets/Configuration --- tests/Assets/Configuration/TypeMock.php | 5 ++++- tests/Assets/Configuration/TypeMock2.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/Assets/Configuration/TypeMock.php b/tests/Assets/Configuration/TypeMock.php index 3a3c092b..ba23b41e 100644 --- a/tests/Assets/Configuration/TypeMock.php +++ b/tests/Assets/Configuration/TypeMock.php @@ -1,5 +1,7 @@ Date: Mon, 28 Oct 2024 12:04:14 -0600 Subject: [PATCH 03/11] phpcs Assets/Entity --- tests/Assets/Entity/Foo.php | 6 ++++-- tests/Assets/Entity/Scientist.php | 25 +++++++++++++++---------- tests/Assets/Entity/Theory.php | 21 ++++++++++++--------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/tests/Assets/Entity/Foo.php b/tests/Assets/Entity/Foo.php index eb4ada62..d931c2e0 100644 --- a/tests/Assets/Entity/Foo.php +++ b/tests/Assets/Entity/Foo.php @@ -1,10 +1,12 @@ Date: Mon, 28 Oct 2024 12:04:48 -0600 Subject: [PATCH 04/11] phpcs Assets/Extensions --- tests/Assets/Extensions/ExtensionMock.php | 6 +++--- tests/Assets/Extensions/ExtensionMock2.php | 6 +++--- tests/Assets/Extensions/ExtensionWithFiltersMock.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Assets/Extensions/ExtensionMock.php b/tests/Assets/Extensions/ExtensionMock.php index 0234a851..c84350de 100644 --- a/tests/Assets/Extensions/ExtensionMock.php +++ b/tests/Assets/Extensions/ExtensionMock.php @@ -1,5 +1,7 @@ assertTrue(true); } - /** - * @return mixed[] - */ + /** @return mixed[] */ public function getFilters(): array { return []; diff --git a/tests/Assets/Extensions/ExtensionMock2.php b/tests/Assets/Extensions/ExtensionMock2.php index b4c7c636..2faefb75 100644 --- a/tests/Assets/Extensions/ExtensionMock2.php +++ b/tests/Assets/Extensions/ExtensionMock2.php @@ -1,5 +1,7 @@ 'FilterMock', - 'filter2' => 'FilterMock' + 'filter2' => 'FilterMock', ]; } } From 8f7e1c3fc13fb77a6532be8537b0fce128b90afe Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Mon, 28 Oct 2024 12:07:22 -0600 Subject: [PATCH 05/11] phpcs Assets/Middleware --- tests/Assets/Middleware/BindableEntity.php | 12 ++++++++---- .../Middleware/BindableEntityWithInterface.php | 12 ++++++++---- tests/Assets/Middleware/EntityController.php | 17 +++++++++++------ 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/tests/Assets/Middleware/BindableEntity.php b/tests/Assets/Middleware/BindableEntity.php index 9298ceae..3d5bdaed 100644 --- a/tests/Assets/Middleware/BindableEntity.php +++ b/tests/Assets/Middleware/BindableEntity.php @@ -1,19 +1,23 @@ id; } - public function getName() + public function getName(): string { return strtolower($this->name); } diff --git a/tests/Assets/Middleware/BindableEntityWithInterface.php b/tests/Assets/Middleware/BindableEntityWithInterface.php index 71304f8e..b0395447 100644 --- a/tests/Assets/Middleware/BindableEntityWithInterface.php +++ b/tests/Assets/Middleware/BindableEntityWithInterface.php @@ -1,21 +1,25 @@ id; } - public function getName() + public function getName(): string { return strtolower($this->name); } diff --git a/tests/Assets/Middleware/EntityController.php b/tests/Assets/Middleware/EntityController.php index 768e14e7..b1e425de 100644 --- a/tests/Assets/Middleware/EntityController.php +++ b/tests/Assets/Middleware/EntityController.php @@ -1,35 +1,40 @@ getName(); } - public function interfacer(BindableEntityWithInterface $entity) + public function interfacer(BindableEntityWithInterface $entity): int { return $entity->getId(); } - public function returnValue(string $value) + public function returnValue(string $value): string { return $value; } - public function returnEntity(BindableEntity $entity = null) { + public function returnEntity(BindableEntity|null $entity = null): BindableEntity|null + { return $entity; } - public function returnEntityName(BindableEntity $entity) { + public function returnEntityName(BindableEntity $entity): string + { return $entity->getName(); } - public function checkRequest(Request $request) { + public function checkRequest(Request $request): string + { return $request instanceof Request ? 'request' : 'something else'; } } From bf5f9ecdb3542a7acb1cb90c1f20d58bcaaac0d8 Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Mon, 28 Oct 2024 12:08:38 -0600 Subject: [PATCH 06/11] phpcs Assets/Mock --- tests/Assets/Mock/CountableEntityMock.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Assets/Mock/CountableEntityMock.php b/tests/Assets/Mock/CountableEntityMock.php index c5bb1ad0..1feefa2e 100644 --- a/tests/Assets/Mock/CountableEntityMock.php +++ b/tests/Assets/Mock/CountableEntityMock.php @@ -1,5 +1,7 @@ Date: Mon, 28 Oct 2024 12:10:07 -0600 Subject: [PATCH 07/11] phpcs Assets/Notifications --- tests/Assets/Notifications/CustomNotifiableStub.php | 4 +++- tests/Assets/Notifications/NotifiableStub.php | 3 ++- tests/Assets/Notifications/NotificationDatabaseStub.php | 4 +++- tests/Assets/Notifications/NotificationInvalidStub.php | 2 ++ tests/Assets/Notifications/NotificationStub.php | 4 +++- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/Assets/Notifications/CustomNotifiableStub.php b/tests/Assets/Notifications/CustomNotifiableStub.php index b451c0a1..54885e56 100644 --- a/tests/Assets/Notifications/CustomNotifiableStub.php +++ b/tests/Assets/Notifications/CustomNotifiableStub.php @@ -1,5 +1,7 @@ Date: Mon, 28 Oct 2024 12:10:56 -0600 Subject: [PATCH 08/11] phpcs Assets/Repository --- tests/Assets/Repository/ScientistRepository.php | 2 ++ tests/Assets/Repository/TheoryRepository.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/Assets/Repository/ScientistRepository.php b/tests/Assets/Repository/ScientistRepository.php index fcace610..70ca9bc4 100644 --- a/tests/Assets/Repository/ScientistRepository.php +++ b/tests/Assets/Repository/ScientistRepository.php @@ -1,5 +1,7 @@ Date: Mon, 28 Oct 2024 12:14:07 -0600 Subject: [PATCH 09/11] phpcs Assets/Serializers --- tests/Assets/Serializers/ArrayableEntity.php | 16 ++++++++++------ tests/Assets/Serializers/JsonableEntity.php | 14 ++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/Assets/Serializers/ArrayableEntity.php b/tests/Assets/Serializers/ArrayableEntity.php index 805971d9..04cf7588 100644 --- a/tests/Assets/Serializers/ArrayableEntity.php +++ b/tests/Assets/Serializers/ArrayableEntity.php @@ -1,5 +1,7 @@ id; } - public function getName() + public function getName(): string { return $this->name; } - public function getList() + /** @return array|string[] */ + public function getList(): array { return $this->list; } diff --git a/tests/Assets/Serializers/JsonableEntity.php b/tests/Assets/Serializers/JsonableEntity.php index 6a04415b..3faa5de8 100644 --- a/tests/Assets/Serializers/JsonableEntity.php +++ b/tests/Assets/Serializers/JsonableEntity.php @@ -1,5 +1,7 @@ id; } - public function getName() + public function getName(): string { return $this->name; } - public function getNumeric() + public function getNumeric(): string { return $this->numeric; } From 6ad58aae119b8d520d98ffbc6ea8538ac718d975 Mon Sep 17 00:00:00 2001 From: Tom H Anderson Date: Mon, 28 Oct 2024 12:15:27 -0600 Subject: [PATCH 10/11] phpcs Assets/Testing --- tests/Assets/Testing/AncestorHydrateableClass.php | 2 ++ tests/Assets/Testing/ChildHydrateableClass.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/Assets/Testing/AncestorHydrateableClass.php b/tests/Assets/Testing/AncestorHydrateableClass.php index 63291c1a..3a955941 100644 --- a/tests/Assets/Testing/AncestorHydrateableClass.php +++ b/tests/Assets/Testing/AncestorHydrateableClass.php @@ -1,5 +1,7 @@ Date: Mon, 28 Oct 2024 12:16:22 -0600 Subject: [PATCH 11/11] phpcs all test assets --- tests/Assets/AnotherListenerStub.php | 2 ++ tests/Assets/Decorator.php | 2 ++ tests/Assets/FakeConnection.php | 2 ++ tests/Assets/FakeEventManager.php | 2 ++ tests/Assets/FilterStub.php | 4 +++- tests/Assets/ListenerStub.php | 2 ++ tests/Assets/SubscriberStub.php | 11 ++++++----- 7 files changed, 19 insertions(+), 6 deletions(-) diff --git a/tests/Assets/AnotherListenerStub.php b/tests/Assets/AnotherListenerStub.php index 7c9f560f..3f7a7ccd 100644 --- a/tests/Assets/AnotherListenerStub.php +++ b/tests/Assets/AnotherListenerStub.php @@ -1,5 +1,7 @@