protected function getItems($items)
    {
        if (\is_array($items)) {
            return $items;
        } elseif ($items instanceof self) {
            return $items->all();
        } elseif ($items instanceof Traversable) {
            return \iterator_to_array($items);
        }
        return (array) $items;
    }
protected function getItems($items)
    {
        if (\is_array($items)) {
            return $items;
        } elseif ($items instanceof self) {
            return $items->all();
        } elseif ($items instanceof Traversable) {
            return \iterator_to_array($items);
        }
        return (array) $items;
    }
protected function getItems ( $ items ) { if ( \ is_array ( $ items ) ) { return $ items ; } elseif ( $ items instanceof self ) { return $ items -> all ( ) ; } elseif ( $ items instanceof Traversable ) { return \ iterator_to_array ( $ items ) ; } return ( array ) $ items ; }
Sanity check items being passed into constructor.

@since 1.0.0

@param  mixed $items The items being added to the collection.
@return array
Sanity check items being passed into constructor .