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:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user