Skip to content
This repository was archived by the owner on Dec 29, 2020. It is now read-only.

Commit 80b53b5

Browse files
committed
converter: convert any scalar array declaration to pure array
1 parent 3d8879b commit 80b53b5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Converter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use phpDocumentor\Reflection\Php\File;
2121
use phpDocumentor\Reflection\Php\Interface_;
2222
use phpDocumentor\Reflection\Php\Project;
23+
use phpDocumentor\Reflection\Types\Array_;
2324
use phpDocumentor\Reflection\Types\Compound;
2425
use phpDocumentor\Reflection\Types\Null_;
2526

@@ -473,6 +474,12 @@ private function getType(Tag $tag): array
473474
return [];
474475
}
475476

477+
if ($type instanceof Array_) {
478+
// May contain more specific type declarations, but we only
479+
// convert to pure arrays
480+
return ['array', false];
481+
}
482+
476483
return [$type->__toString(), false];
477484
}
478485
}

0 commit comments

Comments
 (0)