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
            ));
        }
    }