Skip to content

Commit bf35294

Browse files
author
Carl Schwan
committed
chore(rector): Apply nextcloud 30 set
Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
1 parent 42a59c1 commit bf35294

2 files changed

Lines changed: 13 additions & 28 deletions

File tree

‎lib/Controller/ApiController.php‎

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,20 @@
3030
use OCP\AppFramework\OCS\OCSNotFoundException;
3131
use OCP\AppFramework\OCSController;
3232
use OCP\IRequest;
33-
use OCP\IUserManager;
3433
use OCP\IUserSession;
3534
use OCP\Share\IShare;
3635
use function iter\filter;
3736
use function iter\map;
3837
use function iter\toArray;
3938

4039
class ApiController extends OCSController {
41-
42-
/** @var IUserSession */
43-
protected $userSession;
44-
45-
/** @var SharesList */
46-
protected $sharesList;
47-
48-
/**
49-
* @param string $appName
50-
* @param IRequest $request
51-
* @param IUserSession $userSession
52-
* @param IUserManager $userManager
53-
* @param SharesList $sharesList
54-
*/
5540
public function __construct(
5641
string $appName,
5742
IRequest $request,
58-
IUserSession $userSession,
59-
private IUserManager $userManager,
60-
SharesList $sharesList,
43+
private IUserSession $userSession,
44+
private SharesList $sharesList,
6145
) {
6246
parent::__construct($appName, $request);
63-
64-
$this->userSession = $userSession;
65-
$this->sharesList = $sharesList;
6647
}
6748

6849
/**
@@ -71,7 +52,6 @@ public function __construct(
7152
* Get shared sub folders of a fiven path
7253
*
7354
* @param string $path path of the current folder
74-
* @return DataResponse
7555
*/
7656
public function getSharedSubfolders(string $path): DataResponse {
7757
$currentUser = $this->userSession->getUser();

‎tests/bootstrap.php‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<?php
22

3-
define('PHPUNIT_RUN', 1);
3+
/**
4+
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
5+
* SPDX-License-Identifier: AGPL-3.0-or-later
6+
*/
47

5-
require_once __DIR__ . '/../../../lib/base.php';
8+
declare(strict_types=1);
69

7-
OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
8-
OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true);
10+
use OCP\App\IAppManager;
11+
use OCP\Server;
912

10-
OC_App::loadApp('sharelisting');
13+
require_once __DIR__.'/../../../lib/base.php';
14+
require_once __DIR__.'/../../../tests/autoload.php';
15+
require_once __DIR__.'/../vendor/autoload.php';
1116

12-
OC_Hook::clear();
17+
Server::get(IAppManager::class)->loadApp('approval');

0 commit comments

Comments
 (0)