src/RepositoryTrait.php
public function remove($objects, bool $flush = false)
    {
        if (!\is_object($objects) && !is_iterable($objects)) {
            $objects = $this->find($objects);
        }

        $this->runManagerAction('remove', $objects, $flush);
    }
public function remove($objects, bool $flush = false)
    {
        if (!\is_object($objects) && !is_iterable($objects)) {
            $objects = $this->find($objects);
        }

        $this->runManagerAction('remove', $objects, $flush);
    }
Remove objects.

@param object|iterable|string|int $objects
@param bool                       $flush

@throws \InvalidArgumentException