Skip to content

Commit 0fb2023

Browse files
committed
Fixed the 'CallableArray` constructor
1 parent d9ac1c5 commit 0fb2023

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/PseudoTypes/CallableArray.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
*/
2727
final class CallableArray extends Array_ implements PseudoType
2828
{
29+
public function __construct()
30+
{
31+
parent::__construct(new Mixed_(), new Integer());
32+
}
33+
2934
public function underlyingType(): Type
3035
{
3136
return new Array_(new Mixed_(), new Integer());

tests/unit/PseudoTypes/CallableArrayTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public function testCreate(): void
2525
$type = new CallableArray();
2626

2727
$this->assertEquals(new Array_(new Mixed_(), new Integer()), $type->underlyingType());
28+
$this->assertEquals(new Mixed_(), $type->getValueType());
29+
$this->assertEquals(new Integer(), $type->getKeyType());
2830
}
2931

3032
public function testToString(): void

0 commit comments

Comments
 (0)