protected function storeRelationship(string $class, string $dependency): void
    {
        $this->relationships[$class][$dependency] = true;

        if (isset($this->relationships[$class][$dependency]) && isset($this->relationships[$dependency][$class])) {
            throw new ContainerException(sprintf(
                'Cyclical dependency found between `%s` and `%s`.',
                $class,
                $dependency
            ));
        }
    }
protected function storeRelationship(string $class, string $dependency): void
    {
        $this->relationships[$class][$dependency] = true;

        if (isset($this->relationships[$class][$dependency]) && isset($this->relationships[$dependency][$class])) {
            throw new ContainerException(sprintf(
                'Cyclical dependency found between `%s` and `%s`.',
                $class,
                $dependency
            ));
        }
    }
protected function storeRelationship ( string $ class , string $ dependency ) : void { $ this -> relationships [ $ class ] [ $ dependency ] = true ; if ( isset ( $ this -> relationships [ $ class ] [ $ dependency ] ) && isset ( $ this -> relationships [ $ dependency ] [ $ class ] ) ) { throw new ContainerException ( sprintf ( 'Cyclical dependency found between `%s` and `%s`.' , $ class , $ dependency ) ) ; } }
Store the relationship between the two items.

@throws ContainerException
Store the relationship between the two items .