private static function trimNullable($type) { if (0 === strpos($type, '?')) { return [true, substr($type, 1)]; } return [false, $type]; }