Lines Matching refs:type
157 * @param string|Name|Identifier|ComplexType $type The type to normalize
161 public static function normalizeType($type) { argument
162 if (!is_string($type)) {
164 !$type instanceof Name && !$type instanceof Identifier &&
165 !$type instanceof ComplexType
171 return $type;
175 if (strlen($type) > 0 && $type[0] === '?') {
177 $type = substr($type, 1);
197 $lowerType = strtolower($type);
199 $type = new Identifier($lowerType);
201 $type = self::normalizeName($type);
207 if ($nullable && in_array((string) $type, $notNullableTypes)) {
208 throw new \LogicException(sprintf('%s type cannot be nullable', $type));
211 return $nullable ? new NullableType($type) : $type;