]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix some MissingDocblockType or InvalidDocblock warnings.
authorDaniel Kesselberg <mail@danielkesselberg.de>
Fri, 14 Aug 2020 13:10:48 +0000 (15:10 +0200)
committerDaniel Kesselberg <mail@danielkesselberg.de>
Fri, 14 Aug 2020 13:10:48 +0000 (15:10 +0200)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
18 files changed:
apps/accessibility/lib/Controller/ConfigController.php
apps/dav/lib/CalDAV/Schedule/Plugin.php
apps/dav/lib/CardDAV/AddressBookImpl.php
apps/dav/lib/CardDAV/PhotoCache.php
apps/dav/lib/Connector/Sabre/FilesPlugin.php
apps/encryption/lib/HookManager.php
apps/files/lib/Controller/ApiController.php
apps/files/templates/index.php
apps/files/templates/recentlist.php
apps/files_external/lib/Command/ListCommand.php
apps/files_external/lib/Service/UserTrait.php
apps/files_external/templates/list.php
apps/files_sharing/lib/Controller/ShareAPIController.php
apps/files_sharing/lib/Controller/ShareesAPIController.php
apps/files_sharing/lib/Helper.php
apps/files_sharing/lib/SharedMount.php
apps/files_sharing/templates/list.php
apps/files_sharing/templates/public.php

index 65173ccacea3f9f68ab9024b36093a903460207d..d2eb9fc707d3b4d39edbe2f3f73f00ef08ab99eb 100644 (file)
@@ -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') {
index c2e46f92cfd06d70c49ebcb7e93d46f00ed670d3..fd2a2ca6d2842b5ed43b3c54c329d2a4939c59cc 100644 (file)
@@ -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';
index 02dc7c5d0159f399ac6d31e41c2072865d91c0a0..1c35e2c400cc1dc299b3b9cb1d5e2e98a93d266a 100644 (file)
@@ -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'];
index e28a5ca2f080c2242f1868322eb21b7ab1f523ca..ca3853c76e687e5d5cd3f7a310173880bcfe8b3e 100644 (file)
@@ -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;
 
index 076e5b6483bedf938e31e793dc54babd32a14f65..c831ab86dc7490d233ea6f0b50909767d80bf458 100644 (file)
@@ -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'])) {
index 324c0d718da5e33c117ca8d747cd3fa5f949a241..640111397ff83322174dd5198c33eb93cccb1753 100644 (file)
@@ -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();
                }
index 2add685133e4453aa4a8fa5c6a43390b5c5d1b41..16596ea05a6d62d6fc85325be5e519836f62c121 100644 (file)
@@ -332,7 +332,7 @@ class ApiController extends Controller {
         *
         * @NoAdminRequired
         *
-        * @param string
+        * @param string $folderpath
         * @return string
         * @throws \OCP\Files\NotFoundException
         */
index 2bac8410f916f5df57fbd8aea9f0c48e279b291f..3ba0474daaf2c19c2eaa8170ebadf802cd228605 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
 <?php $_['appNavigation']->printPage(); ?>
 <div id="app-content">
 
index 360b5c95ee40f3acb561df5a6902623a939a65de..95997288193153823c3da8a8e02a76715aaacb82 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
 <div id='notification'></div>
 
 <div id="emptycontent" class="hidden"></div>
index 279e581f95e9c1d612a3d6e9d6cf16c5df8e7434..42c4cddb1711c2adb99e4dfc217e791d28788739 100644 (file)
@@ -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
index 192bb6e02bd873fc5752e6bed8dc94d794047b2a..aa00bf623c10339ae909bcbddde828ec74ee5d22 100644 (file)
@@ -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) {
index e1b666c14c1829667aaae36d51258664ce43f6e4..1d4f6993168274fb1dea4f937c67227d2315b9c8 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
 <div id="controls">
        <div id="file_action_panel"></div>
 </div>
index 78b2eb1bc536d9fa1e313428e92bcc0a535e1ed6..c629860df235892998c8320d336f325e6aeb758a 100644 (file)
@@ -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
index b523dd3d37dc46066241387a6f273106b64b75c7..3ed777a8f7158843902eb9087758692bcb0de9f6 100644 (file)
@@ -54,7 +54,7 @@ use function usort;
 
 class ShareesAPIController extends OCSController {
 
-       /** @var userId */
+       /** @var string */
        protected $userId;
 
        /** @var IConfig */
index d3c6deeec2e54b01e8a835d9f2e73706c44401c0..2f1f6da79ca6fe11bdd85b919449a1455f593a9b 100644 (file)
@@ -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) {
index 487011584c7d4e5126b77dd21d010ae4069331b6..02e656a4fd5424685f2fa4fcf9ea6a35bd177355 100644 (file)
@@ -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);
index 03c097725a19df2ae58a8705e6838af4d1665c66..4b216de8e7071a4ebc1ca4fc54426b1e688442e5 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
 <div id='notification'></div>
 
 <div id="emptycontent" class="hidden"></div>
index 751303e810934b73bd4e47af855ea5e6e167c037..bdd3e8399ead639e5ac9c7942b76b37a3f4474e8 100644 (file)
@@ -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+, ...)*/?>