diff --git a/src/PseudoTypes/ArrayShape.php b/src/PseudoTypes/ArrayShape.php index 48e66f0..e827ffb 100644 --- a/src/PseudoTypes/ArrayShape.php +++ b/src/PseudoTypes/ArrayShape.php @@ -32,6 +32,14 @@ public function __construct(ArrayShapeItem ...$items) $this->items = $items; } + /** + * @return ArrayShapeItem[] + */ + public function getItems(): array + { + return $this->items; + } + public function underlyingType(): Type { return new Array_(new Mixed_(), new ArrayKey()); diff --git a/tests/unit/PseudoTypes/ArrayShapeTest.php b/tests/unit/PseudoTypes/ArrayShapeTest.php new file mode 100644 index 0000000..314d030 --- /dev/null +++ b/tests/unit/PseudoTypes/ArrayShapeTest.php @@ -0,0 +1,21 @@ +assertSame([$item1, $item2], $arrayShape->getItems()); + } +} \ No newline at end of file