Skip to content

Commit

Permalink
Google classes PSR cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
masbug committed Jan 3, 2022
1 parent 7d92cba commit 91936a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions src/GoogleDriveAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace Masbug\Flysystem;

use Exception;
use Google_Service_Drive;
use Google\Service\Drive;
use Google\Service\Drive\DriveFile;
use Google\Service\Drive\FileList;
Expand Down Expand Up @@ -71,9 +70,9 @@ class GoogleDriveAdapter implements FilesystemAdapter
const DIRMIME = 'application/vnd.google-apps.folder';

/**
* Google_Service_Drive instance
* Google\Service\Drive instance
*
* @var Google_Service_Drive|Drive
* @var Drive
*/
protected $service;

Expand Down Expand Up @@ -224,7 +223,7 @@ class GoogleDriveAdapter implements FilesystemAdapter
/**
* GoogleDriveAdapter constructor.
*
* @param Drive|Google_Service_Drive $service
* @param Drive $service
* @param string|null $root
* @param array $options
*/
Expand Down Expand Up @@ -281,7 +280,7 @@ public function __construct($service, $root = null, $options = [])
}

/**
* Gets the service (Google_Service_Drive)
* Gets the service
*
* @return Google\Service\Drive
*/
Expand Down
8 changes: 4 additions & 4 deletions src/StreamableUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

use Google\Client;
use Google\Http\REST;
use Google_Client;
use Google\Exception as GoogleException;
use GuzzleHttp\Psr7\LimitStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Uri;
Expand Down Expand Up @@ -62,7 +62,7 @@ class StreamableUpload
/** @var int */
private $progress;

/** @var Client|Google_Client */
/** @var Client */
private $client;

/** @var \Psr\Http\Message\RequestInterface */
Expand All @@ -79,7 +79,7 @@ class StreamableUpload
private $httpResultCode;

/**
* @param Client|Google_Client $client
* @param Client $client
* @param RequestInterface $request
* @param string $mimeType
* @param null|string|resource|StreamInterface $data Data you want to upload
Expand Down Expand Up @@ -398,7 +398,7 @@ private function fetchResumeUri()
$error = "Failed to start the resumable upload (HTTP {$message})";
$this->client->getLogger()->error($error);

throw new \Google_Exception($error);
throw new GoogleException($error);
}

private function transformToUploadUrl()
Expand Down

0 comments on commit 91936a2

Please sign in to comment.