summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-17 17:45:11 +0200
committerGitHub <noreply@github.com>2020-08-17 17:45:11 +0200
commit00cb8e6c54d8f2a26c5770fef5fe4ae1e366d0ce (patch)
treeab84089689092f01793719f43594d3585b0219a7
parentf6daf17fa773bd4b9c9aae070e39dfbefe8de935 (diff)
parent3e7b815da469edf7d8be7fda86debde66aef1aa9 (diff)
downloadnextcloud-server-00cb8e6c54d8f2a26c5770fef5fe4ae1e366d0ce.tar.gz
nextcloud-server-00cb8e6c54d8f2a26c5770fef5fe4ae1e366d0ce.zip
Merge pull request #22253 from nextcloud/debt/noid/docblocks
Fix some MissingDocblockType or InvalidDocblock warnings.
-rw-r--r--apps/accessibility/lib/Controller/ConfigController.php5
-rw-r--r--apps/dav/lib/CalDAV/Schedule/Plugin.php2
-rw-r--r--apps/dav/lib/CardDAV/AddressBookImpl.php1
-rw-r--r--apps/dav/lib/CardDAV/PhotoCache.php1
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php2
-rw-r--r--apps/encryption/lib/HookManager.php3
-rw-r--r--apps/files/lib/Controller/ApiController.php2
-rw-r--r--apps/files/templates/index.php2
-rw-r--r--apps/files/templates/recentlist.php2
-rw-r--r--apps/files_external/lib/Command/ListCommand.php6
-rw-r--r--apps/files_external/lib/Service/UserTrait.php2
-rw-r--r--apps/files_external/templates/list.php2
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php4
-rw-r--r--apps/files_sharing/lib/Controller/ShareesAPIController.php2
-rw-r--r--apps/files_sharing/lib/Helper.php2
-rw-r--r--apps/files_sharing/lib/SharedMount.php2
-rw-r--r--apps/files_sharing/templates/list.php2
-rw-r--r--apps/files_sharing/templates/public.php4
-rw-r--r--lib/private/Server.php18
19 files changed, 30 insertions, 34 deletions
diff --git a/apps/accessibility/lib/Controller/ConfigController.php b/apps/accessibility/lib/Controller/ConfigController.php
index 65173ccacea..d2eb9fc707d 100644
--- a/apps/accessibility/lib/Controller/ConfigController.php
+++ b/apps/accessibility/lib/Controller/ConfigController.php
@@ -37,6 +37,7 @@ use OCP\AppFramework\OCSController;
use OCP\IConfig;
use OCP\IRequest;
use OCP\IUserSession;
+use OCP\PreConditionNotMetException;
class ConfigController extends OCSController {
@@ -103,7 +104,7 @@ class ConfigController extends OCSController {
*
* @param string $key theme or font
* @return DataResponse
- * @throws Exception
+ * @throws OCSBadRequestException|PreConditionNotMetException
*/
public function setConfig(string $key, $value): DataResponse {
if ($key === 'theme' || $key === 'font' || $key === 'highcontrast') {
@@ -137,7 +138,7 @@ class ConfigController extends OCSController {
*
* @param string $key theme or font
* @return DataResponse
- * @throws Exception
+ * @throws OCSBadRequestException
*/
public function deleteConfig(string $key): DataResponse {
if ($key === 'theme' || $key === 'font' || $key === 'highcontrast') {
diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php
index c2e46f92cfd..fd2a2ca6d28 100644
--- a/apps/dav/lib/CalDAV/Schedule/Plugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php
@@ -325,7 +325,7 @@ EOF;
* Returns a list of addresses that are associated with a principal.
*
* @param string $principal
- * @return string?
+ * @return string|null
*/
protected function getCalendarUserTypeForPrincipal($principal):?string {
$calendarUserType = '{' . self::NS_CALDAV . '}calendar-user-type';
diff --git a/apps/dav/lib/CardDAV/AddressBookImpl.php b/apps/dav/lib/CardDAV/AddressBookImpl.php
index 02dc7c5d015..1c35e2c400c 100644
--- a/apps/dav/lib/CardDAV/AddressBookImpl.php
+++ b/apps/dav/lib/CardDAV/AddressBookImpl.php
@@ -82,7 +82,6 @@ class AddressBookImpl implements IAddressBook {
/**
* @return string defining the unique uri
* @since 16.0.0
- * @return string
*/
public function getUri(): string {
return $this->addressBookInfo['uri'];
diff --git a/apps/dav/lib/CardDAV/PhotoCache.php b/apps/dav/lib/CardDAV/PhotoCache.php
index e28a5ca2f08..ca3853c76e6 100644
--- a/apps/dav/lib/CardDAV/PhotoCache.php
+++ b/apps/dav/lib/CardDAV/PhotoCache.php
@@ -36,6 +36,7 @@ use OCP\Files\SimpleFS\ISimpleFile;
use OCP\Files\SimpleFS\ISimpleFolder;
use OCP\ILogger;
use Sabre\CardDAV\Card;
+use Sabre\VObject\Parameter;
use Sabre\VObject\Property\Binary;
use Sabre\VObject\Reader;
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 076e5b6483b..c831ab86dc7 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -276,7 +276,6 @@ class FilesPlugin extends ServerPlugin {
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
//Add OC-Checksum header
- /** @var $node File */
$checksum = $node->getChecksum();
if ($checksum !== null && $checksum !== '') {
$response->addHeader('OC-Checksum', $checksum);
@@ -383,7 +382,6 @@ class FilesPlugin extends ServerPlugin {
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
$propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function () use ($node) {
- /** @var $node \OCA\DAV\Connector\Sabre\File */
try {
$directDownloadUrl = $node->getDirectDownload();
if (isset($directDownloadUrl['url'])) {
diff --git a/apps/encryption/lib/HookManager.php b/apps/encryption/lib/HookManager.php
index 324c0d718da..640111397ff 100644
--- a/apps/encryption/lib/HookManager.php
+++ b/apps/encryption/lib/HookManager.php
@@ -26,6 +26,7 @@ namespace OCA\Encryption;
use OCA\Encryption\Hooks\Contracts\IHook;
class HookManager {
+ /** @var IHook[] */
private $hookInstances = [];
/**
@@ -51,8 +52,6 @@ class HookManager {
foreach ($this->hookInstances as $instance) {
/**
* Fire off the add hooks method of each instance stored in cache
- *
- * @var $instance IHook
*/
$instance->addHooks();
}
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index 2add685133e..16596ea05a6 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -332,7 +332,7 @@ class ApiController extends Controller {
*
* @NoAdminRequired
*
- * @param string
+ * @param string $folderpath
* @return string
* @throws \OCP\Files\NotFoundException
*/
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 2bac8410f91..3ba0474daaf 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<?php $_['appNavigation']->printPage(); ?>
<div id="app-content">
diff --git a/apps/files/templates/recentlist.php b/apps/files/templates/recentlist.php
index 360b5c95ee4..95997288193 100644
--- a/apps/files/templates/recentlist.php
+++ b/apps/files/templates/recentlist.php
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<div id='notification'></div>
<div id="emptycontent" class="hidden"></div>
diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php
index 279e581f95e..42c4cddb171 100644
--- a/apps/files_external/lib/Command/ListCommand.php
+++ b/apps/files_external/lib/Command/ListCommand.php
@@ -97,15 +97,13 @@ class ListCommand extends Base {
}
protected function execute(InputInterface $input, OutputInterface $output): int {
+ /** @var StorageConfig[] $mounts */
if ($input->getOption('all')) {
- /** @var $mounts StorageConfig[] */
$mounts = $this->globalService->getStorageForAllUsers();
$userId = self::ALL;
} else {
$userId = $input->getArgument('user_id');
$storageService = $this->getStorageService($userId);
-
- /** @var $mounts StorageConfig[] */
$mounts = $storageService->getAllStorages();
}
@@ -114,7 +112,7 @@ class ListCommand extends Base {
}
/**
- * @param $userId $userId
+ * @param string $userId
* @param StorageConfig[] $mounts
* @param InputInterface $input
* @param OutputInterface $output
diff --git a/apps/files_external/lib/Service/UserTrait.php b/apps/files_external/lib/Service/UserTrait.php
index 192bb6e02bd..aa00bf623c1 100644
--- a/apps/files_external/lib/Service/UserTrait.php
+++ b/apps/files_external/lib/Service/UserTrait.php
@@ -55,7 +55,7 @@ trait UserTrait {
* Override the user from the session
* Unset with ->resetUser() when finished!
*
- * @param IUser
+ * @param IUser $user
* @return self
*/
public function setUser(IUser $user) {
diff --git a/apps/files_external/templates/list.php b/apps/files_external/templates/list.php
index e1b666c14c1..1d4f6993168 100644
--- a/apps/files_external/templates/list.php
+++ b/apps/files_external/templates/list.php
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<div id="controls">
<div id="file_action_panel"></div>
</div>
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 78b2eb1bc53..c629860df23 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -1466,7 +1466,7 @@ class ShareAPIController extends OCSController {
/**
* Cleanup the remaining locks
- * @throws @LockedException
+ * @throws LockedException
*/
public function cleanup() {
if ($this->lockedNode !== null) {
@@ -1642,7 +1642,7 @@ class ShareAPIController extends OCSController {
*
* @param Node|null $path
* @param boolean $reshares
- * @return void
+ * @return IShare[]
*/
private function getAllShares(?Node $path = null, bool $reshares = false) {
// Get all shares
diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php
index b523dd3d37d..3ed777a8f71 100644
--- a/apps/files_sharing/lib/Controller/ShareesAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php
@@ -54,7 +54,7 @@ use function usort;
class ShareesAPIController extends OCSController {
- /** @var userId */
+ /** @var string */
protected $userId;
/** @var IConfig */
diff --git a/apps/files_sharing/lib/Helper.php b/apps/files_sharing/lib/Helper.php
index d3c6deeec2e..2f1f6da79ca 100644
--- a/apps/files_sharing/lib/Helper.php
+++ b/apps/files_sharing/lib/Helper.php
@@ -63,7 +63,7 @@ class Helper {
/**
* get default share folder
*
- * @param \OC\Files\View
+ * @param \OC\Files\View $view
* @return string
*/
public static function getShareFolder($view = null) {
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index 487011584c7..02e656a4fd5 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -215,7 +215,7 @@ class SharedMount extends MountPoint implements MoveableMount {
*/
public function removeMount() {
$mountManager = \OC\Files\Filesystem::getMountManager();
- /** @var $storage \OCA\Files_Sharing\SharedStorage */
+ /** @var \OCA\Files_Sharing\SharedStorage $storage */
$storage = $this->getStorage();
$result = $storage->unshareStorage();
$mountManager->removeMount($this->mountPoint);
diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php
index 03c097725a1..4b216de8e70 100644
--- a/apps/files_sharing/templates/list.php
+++ b/apps/files_sharing/templates/list.php
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
<div id='notification'></div>
<div id="emptycontent" class="hidden"></div>
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 751303e8109..bdd3e8399ea 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -1,6 +1,6 @@
<?php
-/** @var $l \OCP\IL10N */
-/** @var $_ array */
+/** @var \OCP\IL10N $_ */
+/** @var array $_ */
?>
<div id="app-content">
<?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 1d2690a4d4c..12abf793828 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -290,7 +290,7 @@ class Server extends ServerContainer implements IServerContainer {
return new PreviewManager(
$c->getConfig(),
$c->getRootFolder(),
- new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig(), 'preview'),
+ new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig()),
$c->getEventDispatcher(),
$c->getGeneratorHelper(),
$c->getSession()->get('user_id')
@@ -301,7 +301,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService(\OC\Preview\Watcher::class, function (Server $c) {
return new \OC\Preview\Watcher(
- new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig(), 'preview')
+ new \OC\Preview\Storage\Root($c->getRootFolder(), $c->getSystemConfig())
);
});
@@ -519,7 +519,7 @@ class Server extends ServerContainer implements IServerContainer {
$dispatcher->dispatchTyped(new BeforeUserCreatedEvent($uid, $password));
});
$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
- /** @var $user \OC\User\User */
+ /** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]);
/** @var IEventDispatcher $dispatcher */
@@ -527,7 +527,7 @@ class Server extends ServerContainer implements IServerContainer {
$dispatcher->dispatchTyped(new UserCreatedEvent($user, $password));
});
$userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) {
- /** @var $user \OC\User\User */
+ /** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'pre_deleteUser', ['run' => true, 'uid' => $user->getUID()]);
$legacyDispatcher->dispatch('OCP\IUser::preDelete', new GenericEvent($user));
@@ -536,7 +536,7 @@ class Server extends ServerContainer implements IServerContainer {
$dispatcher->dispatchTyped(new BeforeUserDeletedEvent($user));
});
$userSession->listen('\OC\User', 'postDelete', function ($user) {
- /** @var $user \OC\User\User */
+ /** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_deleteUser', ['uid' => $user->getUID()]);
/** @var IEventDispatcher $dispatcher */
@@ -544,7 +544,7 @@ class Server extends ServerContainer implements IServerContainer {
$dispatcher->dispatchTyped(new UserDeletedEvent($user));
});
$userSession->listen('\OC\User', 'preSetPassword', function ($user, $password, $recoveryPassword) {
- /** @var $user \OC\User\User */
+ /** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'pre_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);
/** @var IEventDispatcher $dispatcher */
@@ -552,7 +552,7 @@ class Server extends ServerContainer implements IServerContainer {
$dispatcher->dispatchTyped(new BeforePasswordUpdatedEvent($user, $password, $recoveryPassword));
});
$userSession->listen('\OC\User', 'postSetPassword', function ($user, $password, $recoveryPassword) {
- /** @var $user \OC\User\User */
+ /** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_setPassword', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'recoveryPassword' => $recoveryPassword]);
/** @var IEventDispatcher $dispatcher */
@@ -567,7 +567,7 @@ class Server extends ServerContainer implements IServerContainer {
$dispatcher->dispatchTyped(new BeforeUserLoggedInEvent($uid, $password));
});
$userSession->listen('\OC\User', 'postLogin', function ($user, $password, $isTokenLogin) {
- /** @var $user \OC\User\User */
+ /** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password, 'isTokenLogin' => $isTokenLogin]);
/** @var IEventDispatcher $dispatcher */
@@ -600,7 +600,7 @@ class Server extends ServerContainer implements IServerContainer {
$dispatcher->dispatchTyped(new UserLoggedOutEvent($user));
});
$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) {
- /** @var $user \OC\User\User */
+ /** @var \OC\User\User $user */
\OC_Hook::emit('OC_User', 'changeUser', ['run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue]);
/** @var IEventDispatcher $dispatcher */