Skip to content

Commit e82e18f

Browse files
committed
fix: Revert to phpstan types
1 parent d7a0206 commit e82e18f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

system/DataCaster/DataCaster.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
use CodeIgniter\Exceptions\InvalidArgumentException;
3030

3131
/**
32-
* @phpstan-type cast_handlers array<string, CastInterface|class-string|EntityCastInterface>
32+
* @phpstan-type cast_handlers array<string, class-string<EntityCastInterface|CastInterface>>
3333
*
3434
* @see CodeIgniter\DataCaster\DataCasterTest
3535
* @see CodeIgniter\Entity\EntityTest
@@ -46,8 +46,7 @@ final class DataCaster
4646
/**
4747
* Convert handlers.
4848
*
49-
* @var array<string, class-string> [type => classname]
50-
* @phpstan-var cast_handlers
49+
* @var cast_handlers [type => classname]
5150
*/
5251
private array $castHandlers = [
5352
'array' => ArrayCast::class,
@@ -66,11 +65,10 @@ final class DataCaster
6665
];
6766

6867
/**
69-
* @param array<string, class-string>|null $castHandlers Custom convert handlers
70-
* @param array<string, string>|null $types [field => type]
71-
* @param object|null $helper Helper object.
72-
* @param bool $strict Strict mode? Set to false for casts for Entity.
73-
* @phpstan-param cast_handlers|null $castHandlers
68+
* @param cast_handlers|null $castHandlers Custom convert handlers
69+
* @param array<string, string>|null $types [field => type]
70+
* @param object|null $helper Helper object.
71+
* @param bool $strict Strict mode? Set to `false` for casts for Entity.
7472
*/
7573
public function __construct(
7674
?array $castHandlers = null,

0 commit comments

Comments
 (0)