protected function ensureRepository( $repository ) {
    if ( $repository === null ) {
      return new Repository();
    }

    if ( $repository instanceof RepostoryContract ) {
      return $repository;
    }

    if ( is_array( $repository ) ) {
      return new Repository( $repository );
    }

    throw new \LogicException( 'A repository should either be an array or a Flysystem\Repository object.' );
  }
protected function ensureRepository( $repository ) {
    if ( $repository === null ) {
      return new Repository();
    }

    if ( $repository instanceof RepostoryContract ) {
      return $repository;
    }

    if ( is_array( $repository ) ) {
      return new Repository( $repository );
    }

    throw new \LogicException( 'A repository should either be an array or a Flysystem\Repository object.' );
  }
protected function ensureRepository ( $ repository ) { if ( $ repository === null ) { return new Repository ( ) ; } if ( $ repository instanceof RepostoryContract ) { return $ repository ; } if ( is_array ( $ repository ) ) { return new Repository ( $ repository ) ; } throw new \ LogicException ( 'A repository should either be an array or a Flysystem\Repository object.' ) ; }
Ensure a Repository instance.

@param null|array|Repository $repository

@return Repository repository instance

@throw  LogicException
Ensure a Repository instance .