PhpSpec\CodeAnalysis\StaticRejectingNamespaceResolver::guardNonObjectTypeHints PHP Method

guardNonObjectTypeHints() private method

private guardNonObjectTypeHints ( $typeAlias )
$typeAlias
    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");
        }
    }