Refactors controllers by using PHP8's constructor property promotion.

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
This commit is contained in:
Faraz Samapoor
2023-07-14 15:41:25 +03:30
parent 90d051f8e4
commit 559579fbd9
17 changed files with 91 additions and 139 deletions

View File

@@ -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;
}
/**