src/Container.php
public function has(string $typeName): bool
    {
        if (isset($this->shared[$typeName]) || isset($this->definitions[$typeName])) {
            return true;
        }
        
        if (!isset($this->typeCache[$typeName])) {
            if (\class_exists($typeName) || \interface_exists($typeName, false)) {
                $this->typeCache[$typeName] = new \ReflectionClass($typeName);
            } else {
                $this->typeCache[$typeName] = false;
            }
        }
        
        return $this->typeCache[$typeName] !== false && $this->typeCache[$typeName]->isInstantiable();
    }
public function has(string $typeName): bool
    {
        if (isset($this->shared[$typeName]) || isset($this->definitions[$typeName])) {
            return true;
        }
        
        if (!isset($this->typeCache[$typeName])) {
            if (\class_exists($typeName) || \interface_exists($typeName, false)) {
                $this->typeCache[$typeName] = new \ReflectionClass($typeName);
            } else {
                $this->typeCache[$typeName] = false;
            }
        }
        
        return $this->typeCache[$typeName] !== false && $this->typeCache[$typeName]->isInstantiable();
    }
public function has ( string $ typeName ) : bool { if ( isset ( $ this -> shared [ $ typeName ] ) || isset ( $ this -> definitions [ $ typeName ] ) ) { return true ; } if ( ! isset ( $ this -> typeCache [ $ typeName ] ) ) { if ( \ class_exists ( $ typeName ) || \ interface_exists ( $ typeName , false ) ) { $ this -> typeCache [ $ typeName ] = new \ ReflectionClass ( $ typeName ) ; } else { $ this -> typeCache [ $ typeName ] = false ; } } return $ this -> typeCache [ $ typeName ] !== false && $ this -> typeCache [ $ typeName ] -> isInstantiable ( ) ; }
Check if an instance or a binding is registered for the given type.

Will attempt to load the given type and check if it is instantiable if no explicit binding is configured.
Check if an instance or a binding is registered for the given type .