Skip to content

Commit dcd5491

Browse files
authored
Cleanup useless comments (#176)
Yolo PR, just performed a cleanup type comments that are already specified in code
1 parent fe3ea0d commit dcd5491

21 files changed

Lines changed: 2 additions & 319 deletions

lib/Controller/ConfigController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ public function __construct(
2525
* @NoCSRFRequired
2626
*
2727
* Set Admin config values
28-
*
29-
* @param array $values
30-
* @return DataResponse
3128
*/
3229
public function setAdminConfig(array $values): DataResponse {
3330
foreach ($values as $key => $value) {

lib/Controller/ExAppsPageController.php

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ public function __construct(
9393

9494
/**
9595
* @NoCSRFRequired
96-
*
97-
* @return TemplateResponse
9896
*/
9997
#[NoCSRFRequired]
10098
public function viewApps(): TemplateResponse {
@@ -141,9 +139,6 @@ private function getExAppsWithUpdates(): array {
141139
* Using the same algorithm of ExApps listing as for regular apps.
142140
* Returns all apps for a category from the App Store
143141
*
144-
* @param string $requestedCategory
145-
* @return array
146-
*
147142
* @throws Exception
148143
*/
149144
private function getAppsForCategory(string $requestedCategory = ''): array {
@@ -272,8 +267,6 @@ private function getAppsForCategory(string $requestedCategory = ''): array {
272267

273268
/**
274269
* @NoCSRFRequired
275-
*
276-
* @return JSONResponse
277270
*/
278271
public function listApps(): JSONResponse {
279272
$apps = $this->getAppsForCategory('');
@@ -431,9 +424,6 @@ public function enableApp(string $appId, array $groups = []): JSONResponse {
431424
* Deploy ExApp if it was not deployed yet.
432425
*
433426
* @PasswordConfirmationRequired
434-
* @param array $appIds
435-
* @param array $groups
436-
* @return JSONResponse
437427
*/
438428
public function enableApps(array $appIds, array $groups = []): JSONResponse {
439429
try {
@@ -584,10 +574,6 @@ private function registerApiScopes(ExApp $exApp, array $requestedExAppScopeGroup
584574

585575
/**
586576
* @PasswordConfirmationRequired
587-
*
588-
* @param string $appId
589-
*
590-
* @return JSONResponse
591577
*/
592578
#[PasswordConfirmationRequired]
593579
public function disableApp(string $appId): JSONResponse {
@@ -596,10 +582,6 @@ public function disableApp(string $appId): JSONResponse {
596582

597583
/**
598584
* @PasswordConfirmationRequired
599-
*
600-
* @param array $appIds
601-
*
602-
* @return JSONResponse
603585
*/
604586
#[PasswordConfirmationRequired]
605587
public function disableApps(array $appIds): JSONResponse {
@@ -705,12 +687,6 @@ public function enableExApp(string $appId): JSONResponse {
705687
]);
706688
}
707689

708-
/**
709-
* @param ExApp $exApp
710-
* @param SimpleXMLElement $infoXml
711-
*
712-
* @return void
713-
*/
714690
private function upgradeExAppScopes(ExApp $exApp, SimpleXMLElement $infoXml): void {
715691
$newExAppScopes = $this->service->getExAppRequestedScopes($exApp, $infoXml);
716692

@@ -751,9 +727,6 @@ public function uninstallApp(string $appId, bool $removeContainer = true, bool $
751727
* Using default force mechanism for ExApps
752728
*
753729
* @PasswordConfirmationRequired
754-
*
755-
* @param string $appId
756-
* @return JSONResponse
757730
*/
758731
#[PasswordConfirmationRequired]
759732
public function force(string $appId): JSONResponse {
@@ -764,17 +737,13 @@ public function force(string $appId): JSONResponse {
764737

765738
/**
766739
* Get all available categories
767-
*
768-
* @return JSONResponse
769740
*/
770741
public function listCategories(): JSONResponse {
771742
return new JSONResponse($this->getAllCategories());
772743
}
773744

774745
/**
775746
* Get ExApp status, that includes initialization information
776-
*
777-
* @return JSONResponse
778747
*/
779748
public function getAppStatus(string $appId): JSONResponse {
780749
$exApp = $this->service->getExApp($appId);

lib/Controller/NotificationsController.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ public function __construct(
3232
/**
3333
* @NoCSRFRequired
3434
* @PublicPage
35-
*
36-
* @param array $params
37-
*
38-
* @return Response
3935
*/
4036
#[AppAPIAuth]
4137
#[PublicPage]

lib/Controller/OCSApiController.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ public function __construct(
3737
* @NoAdminRequired
3838
* @NoCSRFRequired
3939
*
40-
* @param int $level
41-
* @param string $message
42-
*
4340
* @throws OCSBadRequestException
44-
* @return DataResponse
4541
*/
4642
#[AppAPIAuth]
4743
#[PublicPage]
@@ -74,7 +70,6 @@ public function log(int $level, string $message): DataResponse {
7470
* @PublicPage
7571
* @NoCSRFRequired
7672
*
77-
* @return DataResponse
7873
*/
7974
#[AppAPIAuth]
8075
#[PublicPage]
@@ -89,7 +84,6 @@ public function getNCUsersList(): DataResponse {
8984
*
9085
* Get ExApp status, that required during initialization step with progress information
9186
*
92-
* @return DataResponse
9387
*/
9488
#[AppAPIAuth]
9589
#[PublicPage]

lib/Controller/OCSExAppController.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ public function __construct(
2727
/**
2828
* @NoCSRFRequired
2929
*
30-
* @param string $list
31-
*
3230
* @throws OCSBadRequestException
33-
* @return DataResponse
3431
*/
3532
#[NoCSRFRequired]
3633
public function getExAppsList(string $list = 'enabled'): DataResponse {
@@ -43,12 +40,8 @@ public function getExAppsList(string $list = 'enabled'): DataResponse {
4340
/**
4441
* @NoCSRFRequired
4542
*
46-
* @param string $appId
47-
* @param int $enabled
48-
*
4943
* @throws OCSNotFoundException
5044
* @throws OCSBadRequestException
51-
* @return DataResponse
5245
*/
5346
#[NoCSRFRequired]
5447
public function setExAppEnabled(string $appId, int $enabled): DataResponse {

lib/Controller/OCSUiController.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ public function __construct(
4040
* @PublicPage
4141
* @NoCSRFRequired
4242
*
43-
* @param string $name
44-
* @param string $displayName
45-
* @param string $actionHandler
46-
* @param string $icon
47-
* @param string $mime
48-
* @param int $permissions
49-
* @param int $order
50-
* @return DataResponse
5143
* @throws OCSBadRequestException
5244
*/
5345
#[AppAPIAuth]
@@ -68,10 +60,7 @@ public function registerFileActionMenu(string $name, string $displayName, string
6860
* @PublicPage
6961
* @NoCSRFRequired
7062
*
71-
* @param string $name
72-
*
7363
* @throws OCSNotFoundException
74-
* @return DataResponse
7564
*/
7665
#[AppAPIAuth]
7766
#[PublicPage]

lib/Controller/TalkBotController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ public function registerExAppTalkBot(string $name, string $route, string $descri
5858
* @NoCSRFRequired
5959
* @PublicPage
6060
*
61-
* @param string $route
62-
*
6361
* @throws OCSNotFoundException
64-
* @return Response
6562
*/
6663
#[AppAPIAuth]
6764
#[NoCSRFRequired]

lib/Controller/TopMenuController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ public function __construct(
4242
/**
4343
* @NoCSRFRequired
4444
* @NoAdminRequired
45-
* @param string $appId
46-
* @param string $name
47-
* @return TemplateResponse
45+
*
4846
* @throws Exception
4947
*/
5048
#[NoAdminRequired]

lib/DeployActions/AIODockerActions.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,13 @@ public function __construct(
2525

2626
/**
2727
* Detecting AIO instance by config setting or AIO_TOKEN env as fallback
28-
*
29-
* @return bool
3028
*/
3129
public function isAIO(): bool {
3230
return filter_var(getenv('THIS_IS_AIO'), FILTER_VALIDATE_BOOL);
3331
}
3432

3533
/**
3634
* Registers DaemonConfig with default params to use AIO Docker Socket Proxy
37-
*
38-
* @return DaemonConfig|null
3935
*/
4036
public function registerAIODaemonConfig(): ?DaemonConfig {
4137
$defaultDaemonConfig = $this->config->getAppValue(Application::APP_ID, 'default_daemon_config');
@@ -79,8 +75,6 @@ public function registerAIODaemonConfig(): ?DaemonConfig {
7975

8076
/**
8177
* Registers DaemonConfig with default params to use AIO Docker Socket Proxy with GPU
82-
*
83-
* @return DaemonConfig|null
8478
*/
8579
private function registerAIODaemonConfigWithGPU(): ?DaemonConfig {
8680
$daemonConfigWithGPU = $this->daemonConfigService->getDaemonConfigByName(self::AIO_DAEMON_CONFIG_NAME_GPU);
@@ -114,8 +108,6 @@ private function registerAIODaemonConfigWithGPU(): ?DaemonConfig {
114108
/**
115109
* Check if /dev/dri folder mounted to the container.
116110
* In AIO this means that NEXTCLOUD_ENABLE_DRI_DEVICE=true
117-
*
118-
* @return bool
119111
*/
120112
private function isGPUsEnabled(): bool {
121113
$devDri = '/dev/dri';

lib/DeployActions/DockerActions.php

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ public function getAcceptsDeployId(): string {
5656

5757
/**
5858
* Pull image, create and start container
59-
*
60-
* @param DaemonConfig $daemonConfig
61-
* @param array $params
62-
*
63-
* @return array
6459
*/
6560
public function deployExApp(DaemonConfig $daemonConfig, array $params = []): array {
6661
if ($daemonConfig->getAcceptsDeployId() !== 'docker-install') {
@@ -432,13 +427,6 @@ public function buildDeployEnvs(array $params, array $envOptions, array $deployC
432427
return $autoEnvs;
433428
}
434429

435-
/**
436-
* @param string $appId
437-
* @param DaemonConfig $daemonConfig
438-
* @param array $params
439-
*
440-
* @return array
441-
*/
442430
public function loadExAppInfo(string $appId, DaemonConfig $daemonConfig, array $params = []): array {
443431
$this->initGuzzleClient($daemonConfig);
444432
$containerInfo = $this->inspectContainer($this->buildDockerUrl($daemonConfig), $this->buildExAppContainerName($appId));
@@ -521,12 +509,6 @@ public function initGuzzleClient(DaemonConfig $daemonConfig): void {
521509
$this->guzzleClient = new Client($guzzleParams);
522510
}
523511

524-
/**
525-
* @param array $guzzleParams
526-
* @param array $deployConfig
527-
*
528-
* @return array
529-
*/
530512
private function setupCerts(array $guzzleParams, array $deployConfig): array {
531513
if (!$this->config->getSystemValueBool('installed', false)) {
532514
$certs = \OC::$SERVERROOT . '/resources/config/ca-bundle.crt';
@@ -557,9 +539,6 @@ private function buildDevicesParams(array $devices): array {
557539
/**
558540
* Build default volume for ExApp.
559541
* For now only one volume created per ExApp.
560-
*
561-
* @param string $appId
562-
* @return array
563542
*/
564543
private function buildDefaultExAppVolume(string $appId): array {
565544
return [
@@ -572,13 +551,6 @@ private function buildDefaultExAppVolume(string $appId): array {
572551
];
573552
}
574553

575-
/**
576-
* Build ExApp container name (prefix + appid)
577-
*
578-
* @param string $appId
579-
*
580-
* @return string
581-
*/
582554
public function buildExAppContainerName(string $appId): string {
583555
return self::EX_APP_CONTAINER_PREFIX . $appId;
584556
}
@@ -640,10 +612,8 @@ private function isGPUAvailable(): bool {
640612
* Return default GPU device requests for container.
641613
* For now only NVIDIA GPUs supported.
642614
* TODO: Add support for other GPU vendors
643-
*
644-
* @return array[]
645615
*/
646-
private function buildDefaultGPUDeviceRequests() {
616+
private function buildDefaultGPUDeviceRequests(): array {
647617
return [
648618
[
649619
'Driver' => 'nvidia', // Currently only NVIDIA GPU vendor

0 commit comments

Comments
 (0)