private function guardNonObjectTypeHints($typeAlias)
{
$nonObjectTypes = ['int', 'float', 'string', 'bool', 'iterable'];
if (in_array($typeAlias, $nonObjectTypes, true)) {
throw new DisallowedNonObjectTypehintException("Non-object type {$typeAlias} cannot be resolved within a namespace");
}
}