mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Add support for parsing bracket syntax
This commit is contained in:
parent
ad4943ead3
commit
eb9084dbad
@ -16,6 +16,10 @@ abstract class Type
|
||||
*/
|
||||
public static function parseString($type_string, $enclose_with_union = true)
|
||||
{
|
||||
if (strpos($type_string, '[') !== false) {
|
||||
$type_string = TypeChecker::convertSquareBrackets($type_string);
|
||||
}
|
||||
|
||||
$type_tokens = TypeChecker::tokenize($type_string);
|
||||
|
||||
if (count($type_tokens) === 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user