aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Integrity
diff options
context:
space:
mode:
authorFaraz Samapoor <fsa@adlas.at>2023-06-12 18:40:19 +0330
committerLouis <6653109+artonge@users.noreply.github.com>2023-06-20 09:30:21 +0200
commitc0a5bdea5e8c0ad50cd3237edd167a4d8b679049 (patch)
tree9b0d870a87aa88f07c8246b594978db3666310d2 /core/Command/Integrity
parent64c19ce3aab20cae15bd522428ae54548a76b78b (diff)
downloadnextcloud-server-c0a5bdea5e8c0ad50cd3237edd167a4d8b679049.tar.gz
nextcloud-server-c0a5bdea5e8c0ad50cd3237edd167a4d8b679049.zip
Uses PHP8's constructor property promotion.
in core/Command/Info, /Integrity, and /Preview classes. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'core/Command/Integrity')
-rw-r--r--core/Command/Integrity/CheckApp.php5
-rw-r--r--core/Command/Integrity/CheckCore.php5
-rw-r--r--core/Command/Integrity/SignApp.php15
-rw-r--r--core/Command/Integrity/SignCore.php11
4 files changed, 11 insertions, 25 deletions
diff --git a/core/Command/Integrity/CheckApp.php b/core/Command/Integrity/CheckApp.php
index ebd502c3d29..e095c6d9c31 100644
--- a/core/Command/Integrity/CheckApp.php
+++ b/core/Command/Integrity/CheckApp.php
@@ -40,11 +40,8 @@ use Symfony\Component\Console\Output\OutputInterface;
* @package OC\Core\Command\Integrity
*/
class CheckApp extends Base {
- private Checker $checker;
-
- public function __construct(Checker $checker) {
+ public function __construct(private Checker $checker) {
parent::__construct();
- $this->checker = $checker;
}
/**
diff --git a/core/Command/Integrity/CheckCore.php b/core/Command/Integrity/CheckCore.php
index 9436786cad9..c962b80fa3c 100644
--- a/core/Command/Integrity/CheckCore.php
+++ b/core/Command/Integrity/CheckCore.php
@@ -36,11 +36,8 @@ use Symfony\Component\Console\Output\OutputInterface;
* @package OC\Core\Command\Integrity
*/
class CheckCore extends Base {
- private Checker $checker;
-
- public function __construct(Checker $checker) {
+ public function __construct(private Checker $checker) {
parent::__construct();
- $this->checker = $checker;
}
/**
diff --git a/core/Command/Integrity/SignApp.php b/core/Command/Integrity/SignApp.php
index 8492511d597..ebdc714c8c2 100644
--- a/core/Command/Integrity/SignApp.php
+++ b/core/Command/Integrity/SignApp.php
@@ -40,17 +40,12 @@ use Symfony\Component\Console\Output\OutputInterface;
* @package OC\Core\Command\Integrity
*/
class SignApp extends Command {
- private Checker $checker;
- private FileAccessHelper $fileAccessHelper;
- private IURLGenerator $urlGenerator;
-
- public function __construct(Checker $checker,
- FileAccessHelper $fileAccessHelper,
- IURLGenerator $urlGenerator) {
+ public function __construct(
+ private Checker $checker,
+ private FileAccessHelper $fileAccessHelper,
+ private IURLGenerator $urlGenerator,
+ ) {
parent::__construct(null);
- $this->checker = $checker;
- $this->fileAccessHelper = $fileAccessHelper;
- $this->urlGenerator = $urlGenerator;
}
protected function configure() {
diff --git a/core/Command/Integrity/SignCore.php b/core/Command/Integrity/SignCore.php
index 55d356fcd6b..48cfcadd10d 100644
--- a/core/Command/Integrity/SignCore.php
+++ b/core/Command/Integrity/SignCore.php
@@ -39,14 +39,11 @@ use Symfony\Component\Console\Output\OutputInterface;
* @package OC\Core\Command\Integrity
*/
class SignCore extends Command {
- private Checker $checker;
- private FileAccessHelper $fileAccessHelper;
-
- public function __construct(Checker $checker,
- FileAccessHelper $fileAccessHelper) {
+ public function __construct(
+ private Checker $checker,
+ private FileAccessHelper $fileAccessHelper,
+ ) {
parent::__construct(null);
- $this->checker = $checker;
- $this->fileAccessHelper = $fileAccessHelper;
}
protected function configure() {