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