diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-07-18 20:38:40 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-07-19 10:28:11 +0200 |
commit | d8ec3994542d238f9d679d6c426c14caf6ba6450 (patch) | |
tree | d418b14313b2b45ab4456e0ebaacda96536786e3 /apps | |
parent | 0ee83ac56bb7390899699f230f7e022f00d4042e (diff) | |
download | nextcloud-server-d8ec3994542d238f9d679d6c426c14caf6ba6450.tar.gz nextcloud-server-d8ec3994542d238f9d679d6c426c14caf6ba6450.zip |
Run phan over code base
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'apps')
4 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index 105d1073ae6..db5b5bf6d95 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -118,7 +118,7 @@ class Swift extends \OC\Files\Storage\Common { * that one will be returned. * * @param string $path - * @return \OpenCloud\OpenStack\ObjectStorage\Resource\DataObject|bool object + * @return \OpenCloud\ObjectStore\Resource\DataObject|bool object * or false if the object did not exist */ private function fetchObject($path) { @@ -382,9 +382,9 @@ class Swift extends \OC\Files\Storage\Common { try { $c = $this->getContainer(); $streamFactory = new \Guzzle\Stream\PhpStreamRequestFactory(); - $streamInterface = $streamFactory->fromRequest( - $c->getClient() - ->get($c->getUrl($path))); + /** @var \OpenCloud\Common\Http\Client $client */ + $client = $c->getClient(); + $streamInterface = $streamFactory->fromRequest($client->get($c->getUrl($path))); $streamInterface->rewind(); $stream = $streamInterface->getStream(); stream_context_set_option($stream, 'swift','content', $streamInterface); diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 458102036be..c57a738457e 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -308,6 +308,8 @@ class ShareAPIController extends OCSController { * @throws OCSForbiddenException * @throws OCSBadRequestException * @throws OCSException + * + * @suppress PhanUndeclaredClassMethod */ public function createShare( $path = null, diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index 3e0c01b342e..0e94cfb9d7c 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -299,6 +299,7 @@ class ShareesAPIController extends OCSController { /** * @param string $search + * @suppress PhanUndeclaredClassMethod */ protected function getCircles($search) { $this->result['circles'] = $this->result['exact']['circles'] = []; diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index f4db83ea3cf..e584464dbff 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -24,6 +24,7 @@ namespace OCA\ShareByMail; use OC\CapabilitiesManager; use OC\HintException; use OC\Share20\Exception\InvalidShare; +use OC\User\NoUserException; use OCA\ShareByMail\Settings\SettingsManager; use OCP\Activity\IManager; use OCP\DB\QueryBuilder\IQueryBuilder; @@ -923,7 +924,7 @@ class ShareByMailProvider implements IShareProvider { private function getNode($userId, $id) { try { $userFolder = $this->rootFolder->getUserFolder($userId); - } catch (NotFoundException $e) { + } catch (NoUserException $e) { throw new InvalidShare(); } |