From 9c09018e6ed30d51b99b3647cae2905c1ab391da Mon Sep 17 00:00:00 2001 From: El RIDO Date: Wed, 16 Jun 2021 05:50:41 +0200 Subject: [PATCH] address Scrutinizer issues --- lib/Data/Filesystem.php | 9 +++++---- lib/Data/GoogleCloudStorage.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index 25cca45..577ad34 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -99,12 +99,13 @@ class Filesystem extends AbstractData */ public function read($pasteid) { - if (!$this->exists($pasteid)) { + if ( + !$this->exists($pasteid) || + !$paste = self::_get(self::_dataid2path($pasteid) . $pasteid . '.php') + ) { return false; } - return self::upgradePreV1Format( - self::_get(self::_dataid2path($pasteid) . $pasteid . '.php') - ); + return self::upgradePreV1Format($paste); } /** diff --git a/lib/Data/GoogleCloudStorage.php b/lib/Data/GoogleCloudStorage.php index 9cd7f25..f110230 100644 --- a/lib/Data/GoogleCloudStorage.php +++ b/lib/Data/GoogleCloudStorage.php @@ -23,7 +23,7 @@ class GoogleCloudStorage extends AbstractData * * @access private * @static - * @var Bucket + * @var \Google\Cloud\Storage\Bucket */ private static $_bucket = null;