1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Add support for parsing bracket syntax

This commit is contained in:
Matthew Brown 2016-06-26 22:02:23 -04:00
parent ad4943ead3
commit eb9084dbad

View File

@ -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) {