Skip to content

Commit

Permalink
Fix iterable type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed May 16, 2024
1 parent ff92fa5 commit b36ede0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ parameters:
reportUnmatchedIgnoredErrors: false
ignoreErrors:
- identifier: missingType.generics
- identifier: missingType.iterableValue

# https://github.com/phpstan/phpstan-strict-rules/issues/103
-
Expand Down
2 changes: 1 addition & 1 deletion src/Portability/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private function createConvertAll(?Closure $function): Closure
*
* @param Closure $function The function that maps each value of the array
*
* @return Closure(array):array
* @return Closure(array<mixed>):array<mixed>
*/
private function createMapper(Closure $function): Closure
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Types/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testInsertAndSelect(): void
self::assertSame($value2, $res2);
}

/** @param array<scalar|array> $value */
/** @param array<mixed> $value */
private function insert(int $id, array $value): void
{
$result = $this->connection->insert('json_test_table', [
Expand All @@ -73,7 +73,7 @@ private function insert(int $id, array $value): void
self::assertSame(1, $result);
}

/** @return array<scalar|array> */
/** @return array<mixed> */
private function select(int $id): array
{
$value = $this->connection->fetchOne(
Expand Down

0 comments on commit b36ede0

Please sign in to comment.