diff --git a/lib/Controller/AttachmentApiController.php b/lib/Controller/AttachmentApiController.php index 181bca72a..9c0753682 100644 --- a/lib/Controller/AttachmentApiController.php +++ b/lib/Controller/AttachmentApiController.php @@ -29,11 +29,12 @@ use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; class AttachmentApiController extends ApiController { - private $attachmentService; - - public function __construct($appName, IRequest $request, AttachmentService $attachmentService) { + public function __construct( + $appName, + IRequest $request, + private AttachmentService $attachmentService, + ) { parent::__construct($appName, $request); - $this->attachmentService = $attachmentService; } /** diff --git a/lib/Controller/AttachmentController.php b/lib/Controller/AttachmentController.php index 82e000e81..0159ad0a7 100644 --- a/lib/Controller/AttachmentController.php +++ b/lib/Controller/AttachmentController.php @@ -28,13 +28,12 @@ use OCP\AppFramework\Controller; use OCP\IRequest; class AttachmentController extends Controller { - - /** @var AttachmentService */ - private $attachmentService; - - public function __construct($appName, IRequest $request, AttachmentService $attachmentService) { + public function __construct( + $appName, + IRequest $request, + private AttachmentService $attachmentService, + ) { parent::__construct($appName, $request); - $this->attachmentService = $attachmentService; } /** diff --git a/lib/Controller/BoardApiController.php b/lib/Controller/BoardApiController.php index 4d7f6bee1..7e7b8a4f0 100644 --- a/lib/Controller/BoardApiController.php +++ b/lib/Controller/BoardApiController.php @@ -40,18 +40,16 @@ use Sabre\HTTP\Util; * @package OCA\Deck\Controller */ class BoardApiController extends ApiController { - private $boardService; - /** * @param string $appName - * @param IRequest $request - * @param BoardService $service - * @param $userId */ - public function __construct($appName, IRequest $request, BoardService $service, $userId) { + public function __construct( + $appName, + IRequest $request, + private BoardService $boardService, + private $userId, + ) { parent::__construct($appName, $request); - $this->boardService = $service; - $this->userId = $userId; } /** diff --git a/lib/Controller/BoardController.php b/lib/Controller/BoardController.php index 946d98ed6..0220a43db 100644 --- a/lib/Controller/BoardController.php +++ b/lib/Controller/BoardController.php @@ -33,15 +33,14 @@ use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; class BoardController extends ApiController { - private $userId; - private $boardService; - private $permissionService; - - public function __construct($appName, IRequest $request, BoardService $boardService, PermissionService $permissionService, $userId) { + public function __construct( + $appName, + IRequest $request, + private BoardService $boardService, + private PermissionService $permissionService, + private $userId, + ) { parent::__construct($appName, $request); - $this->userId = $userId; - $this->boardService = $boardService; - $this->permissionService = $permissionService; } /** @@ -144,7 +143,7 @@ class BoardController extends ApiController { /** * @NoAdminRequired * @param $aclId - * @return \OCP\AppFramework\Db\Entity + * @return \OCP\AppFramework\Db\Entity|null */ public function deleteAcl($aclId) { return $this->boardService->deleteAcl($aclId); diff --git a/lib/Controller/BoardImportApiController.php b/lib/Controller/BoardImportApiController.php index ec7e76cae..8ddbc11da 100644 --- a/lib/Controller/BoardImportApiController.php +++ b/lib/Controller/BoardImportApiController.php @@ -30,20 +30,13 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; class BoardImportApiController extends OCSController { - /** @var BoardImportService */ - private $boardImportService; - /** @var string */ - private $userId; - public function __construct( string $appName, IRequest $request, - BoardImportService $boardImportService, - string $userId + private BoardImportService $boardImportService, + private string $userId, ) { parent::__construct($appName, $request); - $this->boardImportService = $boardImportService; - $this->userId = $userId; } /** diff --git a/lib/Controller/CardApiController.php b/lib/Controller/CardApiController.php index 4a61b60ee..b864adc2a 100644 --- a/lib/Controller/CardApiController.php +++ b/lib/Controller/CardApiController.php @@ -38,21 +38,22 @@ use OCP\IRequest; * @package OCA\Deck\Controller */ class CardApiController extends ApiController { - private $cardService; - private $userId; - private $assignmentService; /** * @param string $appName * @param IRequest $request * @param CardService $cardService + * @param AssignmentService $assignmentService * @param $userId */ - public function __construct($appName, IRequest $request, CardService $cardService, AssignmentService $assignmentService, $userId) { + public function __construct( + string $appName, + IRequest $request, + private CardService $cardService, + private AssignmentService $assignmentService, + private $userId, + ) { parent::__construct($appName, $request); - $this->cardService = $cardService; - $this->userId = $userId; - $this->assignmentService = $assignmentService; } /** diff --git a/lib/Controller/CardController.php b/lib/Controller/CardController.php index e901ab00a..cc46a1a3b 100644 --- a/lib/Controller/CardController.php +++ b/lib/Controller/CardController.php @@ -29,15 +29,14 @@ use OCP\AppFramework\Controller; use OCP\IRequest; class CardController extends Controller { - private $userId; - private $cardService; - private $assignmentService; - - public function __construct($appName, IRequest $request, CardService $cardService, AssignmentService $assignmentService, $userId) { + public function __construct( + $appName, + IRequest $request, + private CardService $cardService, + private AssignmentService $assignmentService, + private $userId, + ) { parent::__construct($appName, $request); - $this->userId = $userId; - $this->cardService = $cardService; - $this->assignmentService = $assignmentService; } /** diff --git a/lib/Controller/CommentsApiController.php b/lib/Controller/CommentsApiController.php index 425f8632e..51a0bfe2b 100644 --- a/lib/Controller/CommentsApiController.php +++ b/lib/Controller/CommentsApiController.php @@ -31,18 +31,15 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; class CommentsApiController extends OCSController { - - /** @var CommentService */ - private $commentService; - public function __construct( string $appName, IRequest $request, - CommentService $commentService, - string $corsMethods = 'PUT, POST, GET, DELETE, PATCH', string $corsAllowedHeaders = 'Authorization, Content-Type, Accept', int $corsMaxAge = 1728000 + private CommentService $commentService, + string $corsMethods = 'PUT, POST, GET, DELETE, PATCH', + string $corsAllowedHeaders = 'Authorization, Content-Type, Accept', + int $corsMaxAge = 1728000, ) { parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge); - $this->commentService = $commentService; } /** diff --git a/lib/Controller/ConfigController.php b/lib/Controller/ConfigController.php index d263994cb..90c4081b8 100644 --- a/lib/Controller/ConfigController.php +++ b/lib/Controller/ConfigController.php @@ -30,16 +30,12 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; class ConfigController extends OCSController { - private $configService; - public function __construct( $AppName, IRequest $request, - ConfigService $configService + private ConfigService $configService, ) { parent::__construct($AppName, $request); - - $this->configService = $configService; } /** diff --git a/lib/Controller/LabelApiController.php b/lib/Controller/LabelApiController.php index 63cf2f513..188f7fbc0 100644 --- a/lib/Controller/LabelApiController.php +++ b/lib/Controller/LabelApiController.php @@ -35,21 +35,18 @@ use OCP\IRequest; * @package OCA\Deck\Controller */ class LabelApiController extends ApiController { - private $labelService; - private $userId; - /** * @param string $appName - * @param IRequest $request - * @param LabelService $labelService - * @param $userId */ - public function __construct($appName, IRequest $request, LabelService $labelService, $userId) { + public function __construct( + $appName, + IRequest $request, + private LabelService $labelService, + private $userId, + ) { parent::__construct($appName, $request); - $this->labelService = $labelService; - $this->userId = $userId; } - + /** * @NoAdminRequired * @CORS diff --git a/lib/Controller/LabelController.php b/lib/Controller/LabelController.php index 71794e749..f68c1a68f 100644 --- a/lib/Controller/LabelController.php +++ b/lib/Controller/LabelController.php @@ -28,11 +28,12 @@ use OCP\AppFramework\Controller; use OCP\IRequest; class LabelController extends Controller { - private $labelService; - - public function __construct($appName, IRequest $request, LabelService $labelService) { + public function __construct( + $appName, + IRequest $request, + private LabelService $labelService, + ) { parent::__construct($appName, $request); - $this->labelService = $labelService; } /** diff --git a/lib/Controller/OverviewApiController.php b/lib/Controller/OverviewApiController.php index 9d082fd59..77ced003f 100644 --- a/lib/Controller/OverviewApiController.php +++ b/lib/Controller/OverviewApiController.php @@ -32,17 +32,13 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; class OverviewApiController extends OCSController { - - /** @var OverviewService */ - private $dashboardService; - - /** @var string */ - private $userId; - - public function __construct($appName, IRequest $request, OverviewService $dashboardService, $userId) { + public function __construct( + $appName, + IRequest $request, + private OverviewService $dashboardService, + private $userId, + ) { parent::__construct($appName, $request); - $this->dashboardService = $dashboardService; - $this->userId = $userId; } /** diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 1f23bbde4..8008d187d 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -44,37 +44,23 @@ use OCP\IRequest; use OCP\IURLGenerator; class PageController extends Controller { - private PermissionService $permissionService; private IInitialStateService $initialState; - private ConfigService $configService; - private IEventDispatcher $eventDispatcher; - private CardMapper $cardMapper; - private IURLGenerator $urlGenerator; - private CardService $cardService; - private IConfig $config; public function __construct( string $AppName, IRequest $request, - PermissionService $permissionService, + private PermissionService $permissionService, IInitialStateService $initialStateService, - ConfigService $configService, - IEventDispatcher $eventDispatcher, - CardMapper $cardMapper, - IURLGenerator $urlGenerator, - CardService $cardService, - IConfig $config + private ConfigService $configService, + private IEventDispatcher $eventDispatcher, + private CardMapper $cardMapper, + private IURLGenerator $urlGenerator, + private CardService $cardService, + private IConfig $config, ) { parent::__construct($AppName, $request); - $this->permissionService = $permissionService; $this->initialState = $initialStateService; - $this->configService = $configService; - $this->eventDispatcher = $eventDispatcher; - $this->cardMapper = $cardMapper; - $this->urlGenerator = $urlGenerator; - $this->cardService = $cardService; - $this->config = $config; } /** diff --git a/lib/Controller/SearchController.php b/lib/Controller/SearchController.php index 04bd2644e..25717f8df 100644 --- a/lib/Controller/SearchController.php +++ b/lib/Controller/SearchController.php @@ -34,15 +34,12 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; class SearchController extends OCSController { - - /** - * @var SearchService - */ - private $searchService; - - public function __construct(string $appName, IRequest $request, SearchService $searchService) { + public function __construct( + string $appName, + IRequest $request, + private SearchService $searchService, + ) { parent::__construct($appName, $request); - $this->searchService = $searchService; } /** diff --git a/lib/Controller/SessionController.php b/lib/Controller/SessionController.php index 0e6a66b7c..2a825c550 100644 --- a/lib/Controller/SessionController.php +++ b/lib/Controller/SessionController.php @@ -34,20 +34,13 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; class SessionController extends OCSController { - private SessionService $sessionService; - private PermissionService $permissionService; - private BoardMapper $boardMapper; - public function __construct($appName, IRequest $request, - SessionService $sessionService, - PermissionService $permissionService, - BoardMapper $boardMapper + private SessionService $sessionService, + private PermissionService $permissionService, + private BoardMapper $boardMapper, ) { parent::__construct($appName, $request); - $this->sessionService = $sessionService; - $this->permissionService = $permissionService; - $this->boardMapper = $boardMapper; } /** diff --git a/lib/Controller/StackApiController.php b/lib/Controller/StackApiController.php index f210770de..f8b316f14 100644 --- a/lib/Controller/StackApiController.php +++ b/lib/Controller/StackApiController.php @@ -39,18 +39,16 @@ use Sabre\HTTP\Util; * @package OCA\Deck\Controller */ class StackApiController extends ApiController { - private $boardService; - private $stackService; - /** * @param string $appName - * @param IRequest $request - * @param StackService $stackService */ - public function __construct($appName, IRequest $request, StackService $stackService, BoardService $boardService) { + public function __construct( + $appName, + IRequest $request, + private StackService $stackService, + private BoardService $boardService, + ) { parent::__construct($appName, $request); - $this->stackService = $stackService; - $this->boardService = $boardService; } /** diff --git a/lib/Controller/StackController.php b/lib/Controller/StackController.php index c59bf9e1b..451242e5d 100644 --- a/lib/Controller/StackController.php +++ b/lib/Controller/StackController.php @@ -30,12 +30,13 @@ use OCP\AppFramework\Controller; use OCP\IRequest; class StackController extends Controller { - private $userId; - private $stackService; - public function __construct($appName, IRequest $request, StackService $stackService, $userId) { + public function __construct( + string $appName, + IRequest $request, + private StackService $stackService, + private $userId, + ) { parent::__construct($appName, $request); - $this->userId = $userId; - $this->stackService = $stackService; } /**