Mockery\Container::checkForNamedMockClashes PHP Method

checkForNamedMockClashes() protected method

protected checkForNamedMockClashes ( $config )
    protected function checkForNamedMockClashes($config)
    {
        $name = $config->getName();
        if (!$name) {
            return;
        }
        $hash = $config->getHash();
        if (isset($this->_namedMocks[$name])) {
            if ($hash !== $this->_namedMocks[$name]) {
                throw new \Mockery\Exception("The mock named '{$name}' has been already defined with a different mock configuration");
            }
        }
        $this->_namedMocks[$name] = $hash;
    }