public function merge($array)
    {

        if (is_array($array)) {
            $this->storage = array_merge(
                $this->storage,
                $array
            );
        } elseif ($array instanceof Collection) {
            $this->storage = array_merge(
                $this->storage,
                $array->toArray()
            );
        } else {
            throw new \ErrorException(
                'Must be take 1 parameter to be array or Collection',
                E_ERROR
            );
        }

        return $this;
    }
public function merge($array)
    {

        if (is_array($array)) {
            $this->storage = array_merge(
                $this->storage,
                $array
            );
        } elseif ($array instanceof Collection) {
            $this->storage = array_merge(
                $this->storage,
                $array->toArray()
            );
        } else {
            throw new \ErrorException(
                'Must be take 1 parameter to be array or Collection',
                E_ERROR
            );
        }

        return $this;
    }
public function merge ( $ array ) { if ( is_array ( $ array ) ) { $ this -> storage = array_merge ( $ this -> storage , $ array ) ; } elseif ( $ array instanceof Collection ) { $ this -> storage = array_merge ( $ this -> storage , $ array -> toArray ( ) ) ; } else { throw new \ ErrorException ( 'Must be take 1 parameter to be array or Collection' , E_ERROR ) ; } return $ this ; }
Merge the collection with a painting or other collection

@param Collection|array $array
@return Collection

@throws \ErrorException
Merge the collection with a painting or other collection