diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-17 10:37:09 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-17 10:37:09 +0100 |
commit | db033e4e19a1a0f2115b80b8c8864ef3d333f503 (patch) | |
tree | 5a4d3684184eed0a5d2a7420f6f03864e2cd54bf /apps | |
parent | 65259114391eaeab1f6ceb44e52e2c0a5efa9027 (diff) | |
download | nextcloud-server-db033e4e19a1a0f2115b80b8c8864ef3d333f503.tar.gz nextcloud-server-db033e4e19a1a0f2115b80b8c8864ef3d333f503.zip |
Fix PHPDoc and Co.
Ref https://github.com/owncloud/core/pull/14929#discussion_r26501240
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/external/scanner.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/external/scanner.php b/apps/files_sharing/lib/external/scanner.php index 6744b17e967..616d4db44e5 100644 --- a/apps/files_sharing/lib/external/scanner.php +++ b/apps/files_sharing/lib/external/scanner.php @@ -14,11 +14,10 @@ use OCP\Files\StorageInvalidException; use OCP\Files\StorageNotAvailableException; class Scanner extends \OC\Files\Cache\Scanner { - /** - * @var \OCA\Files_Sharing\External\Storage - */ + /** @var \OCA\Files_Sharing\External\Storage */ protected $storage; + /** {@inheritDoc} */ public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) { $this->scanAll(); } @@ -31,6 +30,8 @@ class Scanner extends \OC\Files\Cache\Scanner { * * @param string $file file to scan * @param int $reuseExisting + * @param int $parentId + * @param array | null $cacheData existing data in the cache for the file to be scanned * @return array an array of metadata of the scanned file */ public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null) { @@ -54,6 +55,9 @@ class Scanner extends \OC\Files\Cache\Scanner { * Checks the remote share for changes. * If changes are available, scan them and update * the cache. + * @throws NotFoundException + * @throws StorageInvalidException + * @throws \Exception */ public function scanAll() { try { @@ -76,10 +80,14 @@ class Scanner extends \OC\Files\Cache\Scanner { } } + /** + * @param array $data + * @param string $path + */ private function addResult($data, $path) { $id = $this->cache->put($path, $data); if (isset($data['children'])) { - $children = array(); + $children = []; foreach ($data['children'] as $child) { $children[$child['name']] = true; $this->addResult($child, ltrim($path . '/' . $child['name'], '/')); |