public function resetManager($name = null)
    {
        $this->loadManagers();

        $name = $name ?? $this->getDefaultManagerName();

        if (!isset($this->originalManagers[$name])) {
            throw new \InvalidArgumentException(sprintf('Missing manager with name "%s".', $name));
        }

        $originalManager = $this->originalManagers[$name];

        $this->resetedManagers[$name] = EntityManager::create(
            $originalManager->getConnection(),
            $originalManager->getConfiguration(),
            $originalManager->getEventManager()
        );

        return $this->resetedManagers[$name];
    }
public function resetManager($name = null)
    {
        $this->loadManagers();

        $name = $name ?? $this->getDefaultManagerName();

        if (!isset($this->originalManagers[$name])) {
            throw new \InvalidArgumentException(sprintf('Missing manager with name "%s".', $name));
        }

        $originalManager = $this->originalManagers[$name];

        $this->resetedManagers[$name] = EntityManager::create(
            $originalManager->getConnection(),
            $originalManager->getConfiguration(),
            $originalManager->getEventManager()
        );

        return $this->resetedManagers[$name];
    }
@param string|null $name

@return EntityManager|ObjectManager