diff --git a/src/Endpoints/AbstractRequest.php b/src/Endpoints/AbstractRequest.php index be90c3e..8303a52 100644 --- a/src/Endpoints/AbstractRequest.php +++ b/src/Endpoints/AbstractRequest.php @@ -57,6 +57,7 @@ public function send() abstract public function toArray(): array; + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->toArray(); diff --git a/src/Models/AbstractHolder.php b/src/Models/AbstractHolder.php index 4cd0edf..beb9aee 100644 --- a/src/Models/AbstractHolder.php +++ b/src/Models/AbstractHolder.php @@ -52,6 +52,7 @@ public function toArray(): array /** * @return TEntry[] */ + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->toArray(); diff --git a/src/Models/Contact.php b/src/Models/Contact.php index 01f730e..543630f 100644 --- a/src/Models/Contact.php +++ b/src/Models/Contact.php @@ -427,6 +427,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray()); diff --git a/src/Models/ContactListStatus.php b/src/Models/ContactListStatus.php index e11804f..adb00dc 100644 --- a/src/Models/ContactListStatus.php +++ b/src/Models/ContactListStatus.php @@ -73,6 +73,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray()); diff --git a/src/Models/Contactlist.php b/src/Models/Contactlist.php index d70f5b1..b17db76 100644 --- a/src/Models/Contactlist.php +++ b/src/Models/Contactlist.php @@ -214,6 +214,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray()); diff --git a/src/Models/CustomFieldDefinition.php b/src/Models/CustomFieldDefinition.php index 6de81cf..0475097 100644 --- a/src/Models/CustomFieldDefinition.php +++ b/src/Models/CustomFieldDefinition.php @@ -148,6 +148,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray()); diff --git a/src/Models/CustomFieldOption.php b/src/Models/CustomFieldOption.php index c1459ef..b05fda7 100644 --- a/src/Models/CustomFieldOption.php +++ b/src/Models/CustomFieldOption.php @@ -108,6 +108,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray()); diff --git a/src/Models/CustomFieldValue.php b/src/Models/CustomFieldValue.php index 7e7cf41..801a64c 100644 --- a/src/Models/CustomFieldValue.php +++ b/src/Models/CustomFieldValue.php @@ -104,6 +104,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray()); diff --git a/src/Models/Model.php b/src/Models/Model.php index 5f1210c..1fa9b94 100644 --- a/src/Models/Model.php +++ b/src/Models/Model.php @@ -37,6 +37,7 @@ public static function fromJSON(\stdClass $json): object */ abstract public function toArray(): array; + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->toArray(); diff --git a/src/Models/Order.php b/src/Models/Order.php index 0ba9501..fc69033 100644 --- a/src/Models/Order.php +++ b/src/Models/Order.php @@ -182,6 +182,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray()); diff --git a/tests/Endpoints/Contactlists/Search/RequestTest.php b/tests/Endpoints/Contactlists/Search/RequestTest.php index 7af5b0a..137cdd8 100644 --- a/tests/Endpoints/Contactlists/Search/RequestTest.php +++ b/tests/Endpoints/Contactlists/Search/RequestTest.php @@ -29,6 +29,7 @@ public function testDefaultEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(0, $query['offset'], 'The first page should have 0 offset'); diff --git a/tests/Endpoints/Contacts/Search/RequestTest.php b/tests/Endpoints/Contacts/Search/RequestTest.php index 7a3ca29..2eef99a 100644 --- a/tests/Endpoints/Contacts/Search/RequestTest.php +++ b/tests/Endpoints/Contacts/Search/RequestTest.php @@ -31,6 +31,7 @@ public function testDefaultEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(0, $query['offset'], 'The first page should have 0 offset'); @@ -57,6 +58,7 @@ public function testFilteredEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(50, $query['offset'], 'The second page should the limit value'); diff --git a/tests/Endpoints/CustomFields/Search/RequestTest.php b/tests/Endpoints/CustomFields/Search/RequestTest.php index 651e303..a16ef8f 100644 --- a/tests/Endpoints/CustomFields/Search/RequestTest.php +++ b/tests/Endpoints/CustomFields/Search/RequestTest.php @@ -32,6 +32,7 @@ public function testDefaultEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(0, $query['offset'], 'The first page should have 0 offset'); @@ -58,6 +59,7 @@ public function testFilteredEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(50, $query['offset'], 'The second page should the limit value'); diff --git a/tests/Mock/ModelMock.php b/tests/Mock/ModelMock.php index 9335f84..8f31f66 100644 --- a/tests/Mock/ModelMock.php +++ b/tests/Mock/ModelMock.php @@ -31,6 +31,7 @@ public function toArray(): array ]; } + #[\ReturnTypeWillChange] public function jsonSerialize(): array { return $this->removeEmptyValues($this->toArray());