/** * {@inheritDoc} */ public function setMapper(MapperInterface $mapper) { if (!$mapper instanceof FolderMapperInterface) { throw new \InvalidArgumentException(sprintf('$mapper must be an instance of %s; %s given', FolderMapperInterface::class, get_class($mapper))); } return parent::setMapper($mapper); }
/** * {@inheritDoc} */ public function setMapper(MapperInterface $mapper) { if (!$mapper instanceof UserMapperInterface) { throw new \InvalidArgumentException(sprintf('First argument must implement CmsUser\\Persistence\\UserMapperInterface; %s given', is_object($mapper) ? get_class($mapper) : gettype($mapper))); } return parent::setMapper($mapper); }