- Issue created by @mondrake
We're trying in
📌
Forbid limited length primary and unique keys, allow only in indexes
Needs work
to add a local type alias (https://phpstan.org/writing-php-code/phpdoc-types#local-type-aliases) of an array shape (https://phpstan.org/writing-php-code/phpdoc-types#array-shapes), so that we can reuse the definition in multiple docblocks as it happens later for ::validateUniqueKeySchema()
and ::validatePrimaryKeySchema()
. These aliases can also be imported in other classes with @phpstan-import-type
.
Describing the content of arrays is important in code static analysis and it's mandatory in higher PHPStan's levels.
Parse @phpstan-type
and @phpstan-import-type
annotations, and consider them as variable types; while parsing @param
@var
@return
annotations, consider the aliases as valid types.
Active
2.0
Parser