code: public function remove($object)
      {
          if ($object instanceof Item) {
              return $this->removeItem($object);
          } elseif ($object instanceof Rule) {
              return $this->removeRule($object);
          }
  
          throw new InvalidArgumentException('Removing unsupported object type.');
      }
docs: {@inheritdoc}