private static canonicalNameFromName ( string $name ) : string | ||
$name | string | |
return | string | A canonical name for the given type name |
private static function canonicalNameFromName(string $name) : string
{
static $map = ['NULL' => 'null', 'boolean' => 'bool', 'callback' => 'callable', 'double' => 'float', 'false' => 'bool', 'true' => 'bool', 'integer' => 'int'];
return $map[strtolower($name)] ?? $name;
}