Skip to content

Commit 00cb8e6

Browse files
authored
Merge pull request #22253 from nextcloud/debt/noid/docblocks
Fix some MissingDocblockType or InvalidDocblock warnings.
2 parents f6daf17 + 3e7b815 commit 00cb8e6

File tree

19 files changed

+30
-34
lines changed

19 files changed

+30
-34
lines changed

apps/accessibility/lib/Controller/ConfigController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
use OCP\IConfig;
3838
use OCP\IRequest;
3939
use OCP\IUserSession;
40+
use OCP\PreConditionNotMetException;
4041

4142
class ConfigController extends OCSController {
4243

@@ -103,7 +104,7 @@ public function getConfig(): DataResponse {
103104
*
104105
* @param string $key theme or font
105106
* @return DataResponse
106-
* @throws Exception
107+
* @throws OCSBadRequestException|PreConditionNotMetException
107108
*/
108109
public function setConfig(string $key, $value): DataResponse {
109110
if ($key === 'theme' || $key === 'font' || $key === 'highcontrast') {
@@ -137,7 +138,7 @@ public function setConfig(string $key, $value): DataResponse {
137138
*
138139
* @param string $key theme or font
139140
* @return DataResponse
140-
* @throws Exception
141+
* @throws OCSBadRequestException
141142
*/
142143
public function deleteConfig(string $key): DataResponse {
143144
if ($key === 'theme' || $key === 'font' || $key === 'highcontrast') {

apps/dav/lib/CalDAV/Schedule/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) {
325325
* Returns a list of addresses that are associated with a principal.
326326
*
327327
* @param string $principal
328-
* @return string?
328+
* @return string|null
329329
*/
330330
protected function getCalendarUserTypeForPrincipal($principal):?string {
331331
$calendarUserType = '{' . self::NS_CALDAV . '}calendar-user-type';

apps/dav/lib/CardDAV/AddressBookImpl.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public function getKey() {
8282
/**
8383
* @return string defining the unique uri
8484
* @since 16.0.0
85-
* @return string
8685
*/
8786
public function getUri(): string {
8887
return $this->addressBookInfo['uri'];

apps/dav/lib/CardDAV/PhotoCache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
use OCP\Files\SimpleFS\ISimpleFolder;
3737
use OCP\ILogger;
3838
use Sabre\CardDAV\Card;
39+
use Sabre\VObject\Parameter;
3940
use Sabre\VObject\Property\Binary;
4041
use Sabre\VObject\Reader;
4142

apps/dav/lib/Connector/Sabre/FilesPlugin.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ public function httpGet(RequestInterface $request, ResponseInterface $response)
276276

277277
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
278278
//Add OC-Checksum header
279-
/** @var $node File */
280279
$checksum = $node->getChecksum();
281280
if ($checksum !== null && $checksum !== '') {
282281
$response->addHeader('OC-Checksum', $checksum);
@@ -383,7 +382,6 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)
383382

384383
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
385384
$propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function () use ($node) {
386-
/** @var $node \OCA\DAV\Connector\Sabre\File */
387385
try {
388386
$directDownloadUrl = $node->getDirectDownload();
389387
if (isset($directDownloadUrl['url'])) {

apps/encryption/lib/HookManager.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use OCA\Encryption\Hooks\Contracts\IHook;
2727

2828
class HookManager {
29+
/** @var IHook[] */
2930
private $hookInstances = [];
3031

3132
/**
@@ -51,8 +52,6 @@ public function fireHooks() {
5152
foreach ($this->hookInstances as $instance) {
5253
/**
5354
* Fire off the add hooks method of each instance stored in cache
54-
*
55-
* @var $instance IHook
5655
*/
5756
$instance->addHooks();
5857
}

apps/files/lib/Controller/ApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public function toggleShowFolder(int $show, string $key) {
332332
*
333333
* @NoAdminRequired
334334
*
335-
* @param string
335+
* @param string $folderpath
336336
* @return string
337337
* @throws \OCP\Files\NotFoundException
338338
*/

apps/files/templates/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php /** @var $l \OCP\IL10N */ ?>
1+
<?php /** @var \OCP\IL10N $l */ ?>
22
<?php $_['appNavigation']->printPage(); ?>
33
<div id="app-content">
44

apps/files/templates/recentlist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php /** @var $l \OCP\IL10N */ ?>
1+
<?php /** @var \OCP\IL10N $l */ ?>
22
<div id='notification'></div>
33

44
<div id="emptycontent" class="hidden"></div>

apps/files_external/lib/Command/ListCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,13 @@ protected function configure() {
9797
}
9898

9999
protected function execute(InputInterface $input, OutputInterface $output): int {
100+
/** @var StorageConfig[] $mounts */
100101
if ($input->getOption('all')) {
101-
/** @var $mounts StorageConfig[] */
102102
$mounts = $this->globalService->getStorageForAllUsers();
103103
$userId = self::ALL;
104104
} else {
105105
$userId = $input->getArgument('user_id');
106106
$storageService = $this->getStorageService($userId);
107-
108-
/** @var $mounts StorageConfig[] */
109107
$mounts = $storageService->getAllStorages();
110108
}
111109

@@ -114,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
114112
}
115113

116114
/**
117-
* @param $userId $userId
115+
* @param string $userId
118116
* @param StorageConfig[] $mounts
119117
* @param InputInterface $input
120118
* @param OutputInterface $output

0 commit comments

Comments
 (0)