code: public function getManager($name = null): ObjectManager
      {
          $this->loadManagers();
  
          $name = $name ?? $this->getDefaultManagerName();
  
          if (!isset($this->originalManagers[$name])) {
              throw new \InvalidArgumentException(sprintf('Missing manager with name "%s".', $name));
          }
  
          if (isset($this->resetedManagers[$name])) {
              return $this->resetedManagers[$name];
          }
  
          return $this->originalManagers[$name];
      }
docs: @param string|null $name
  
  @return EntityManager|ObjectManager