Lukasoppermann\Httpstatus\Httpstatus::filterCollection PHP Méthode

filterCollection() protected méthode

Filter a Collection array.
protected filterCollection ( Traversable | array $collection ) : Traversable | array
$collection Traversable | array
Résultat Traversable | array
    protected function filterCollection($collection)
    {
        if (!$collection instanceof Traversable && !is_array($collection)) {
            throw new InvalidArgumentException('The collection must be a Traversable object or an array');
        }
        return $collection;
    }