Open staabm opened 1 year ago
array[string]
scheint mir unterstützt zu werden:
https://github.com/FriendsOfREDAXO/rexstan/blob/e4d1213b6fc04e845cce3d9708c1407e7880eff5/lib/extension/RexFunctionsDynamicReturnTypeExtension.php#L142-L153
Was mir aber zu fehlen scheint (nicht getestet), sind Array-Shapes, die in rex so notiert werden:
$form = rex_post('form', [
['foo', 'int', 1],
['kitchen', 'array[string]'],
]);
Für das psalm-Plugin habe ich es hier umgesetzt (keine Ahnung ob hilfreich): https://github.com/redaxo/psalm-plugin/blob/main/src/Provider/RexTypeReturnProvider.php#L138
In 5.17 kam noch eine weitere Array-Variante hinzu: https://github.com/redaxo/redaxo/pull/6031
$form = rex_post('form', 'array[string]', []);
should be detected asarray<string>
etc.