Zend\Code\Generator\TypeGenerator::trimNullable PHP Method

trimNullable() private static method

private static trimNullable ( string $type ) : bool[] | string[]
$type string
return bool[] | string[] ordered tuple, first key represents whether the type is nullable, second is the trimmed string
    private static function trimNullable($type)
    {
        if (0 === strpos($type, '?')) {
            return [true, substr($type, 1)];
        }
        return [false, $type];
    }