From 6654ff5cd504339a8e5e3ca283254c13dbf59171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Novotn=C3=BD?= Date: Fri, 17 May 2024 14:10:31 +0200 Subject: [PATCH] Update codestyle --- composer.json | 2 +- src/BaseCollection.php | 2 +- tests/BaseCollectionTest.php | 4 ++-- tests/BaseModelTest.php | 4 ++-- tests/ConvertorTest.php | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index efe7efc..2eeeb70 100755 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "ext-json": "*" }, "require-dev": { - "inspirum/coding-standard": "^1.4", + "inspirum/coding-standard": "^1.5", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^10.5", "shipmonk/composer-dependency-analyser": "^1.5", diff --git a/src/BaseCollection.php b/src/BaseCollection.php index fc8c65b..c35abf5 100644 --- a/src/BaseCollection.php +++ b/src/BaseCollection.php @@ -48,7 +48,7 @@ public function offsetGet(mixed $offset): mixed } /** - * @param TKey $offset + * @param TKey $offset * @param TValue $value */ public function offsetSet(mixed $offset, mixed $value): void diff --git a/tests/BaseCollectionTest.php b/tests/BaseCollectionTest.php index 9a4f878..c2d486f 100644 --- a/tests/BaseCollectionTest.php +++ b/tests/BaseCollectionTest.php @@ -44,14 +44,14 @@ public function testJsonSerialize(array $data, string|Throwable $result): void public static function providesToArray(): iterable { yield [ - 'data' => [ + 'data' => [ [1, 3, 4], ], 'result' => '[[1,3,4]]', ]; yield [ - 'data' => [ + 'data' => [ [1, 3, 4], ['a' => 1, 3, 'c' => true, 4], ], diff --git a/tests/BaseModelTest.php b/tests/BaseModelTest.php index a15fb03..b7a3d1a 100644 --- a/tests/BaseModelTest.php +++ b/tests/BaseModelTest.php @@ -53,12 +53,12 @@ public function __toArray(): array public static function providesToArray(): iterable { yield [ - 'data' => [1, 3, 4], + 'data' => [1, 3, 4], 'result' => '[1,3,4]', ]; yield [ - 'data' => ['a' => 1, 3, 'c' => true, 4], + 'data' => ['a' => 1, 3, 'c' => true, 4], 'result' => '{"a":1,"0":3,"c":true,"1":4}', ]; } diff --git a/tests/ConvertorTest.php b/tests/ConvertorTest.php index 3037dc9..0291a8f 100644 --- a/tests/ConvertorTest.php +++ b/tests/ConvertorTest.php @@ -38,19 +38,19 @@ public function testToArray(mixed $data, array|Throwable $result, ?int $limit = public static function providesToArray(): iterable { yield [ - 'data' => [1, 3, 4], + 'data' => [1, 3, 4], 'result' => [1, 3, 4], ]; yield [ - 'data' => '1', + 'data' => '1', 'result' => new RuntimeException('Cannot cast to array'), ]; yield [ 'data' => (static function () { - $o = new stdClass(); - $o->foo = 'bar'; + $o = new stdClass(); + $o->foo = 'bar'; $o->debug = true; return $o; @@ -65,8 +65,8 @@ public static function providesToArray(): iterable 'data' => [ 2, (static function () { - $o = new stdClass(); - $o->foo = 'bar'; + $o = new stdClass(); + $o->foo = 'bar'; $o->debug = true; return $o;