Skip to content

Commit

Permalink
Update codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-novotny committed May 17, 2024
1 parent 4bb74fb commit 6654ff5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/BaseCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/BaseCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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],
],
Expand Down
4 changes: 2 additions & 2 deletions tests/BaseModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}',
];
}
Expand Down
12 changes: 6 additions & 6 deletions tests/ConvertorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 6654ff5

Please sign in to comment.