use Symfony\Component\Console\Output\OutputInterface;
class DeleteConfig extends Base {
- protected IConfig $config;
-
- /**
- * @param IConfig $config
- */
- public function __construct(IConfig $config) {
+ public function __construct(protected IConfig $config) {
parent::__construct();
- $this->config = $config;
}
protected function configure() {
use Symfony\Component\Console\Output\OutputInterface;
class GetConfig extends Base {
- protected IConfig $config;
-
- public function __construct(IConfig $config) {
+ public function __construct(protected IConfig $config) {
parent::__construct();
- $this->config = $config;
}
protected function configure() {
use Symfony\Component\Console\Output\OutputInterface;
class SetConfig extends Base {
- protected IConfig $config;
-
- public function __construct(IConfig $config) {
+ public function __construct(protected IConfig $config) {
parent::__construct();
- $this->config = $config;
}
protected function configure() {
class Import extends Command implements CompletionAwareInterface {
protected array $validRootKeys = ['system', 'apps'];
- protected IConfig $config;
- public function __construct(IConfig $config) {
+ public function __construct(protected IConfig $config) {
parent::__construct();
- $this->config = $config;
}
protected function configure() {
class ListConfigs extends Base {
protected string $defaultOutputFormat = self::OUTPUT_FORMAT_JSON_PRETTY;
- protected SystemConfig $systemConfig;
- protected IAppConfig $appConfig;
- public function __construct(SystemConfig $systemConfig, IAppConfig $appConfig) {
+ public function __construct(
+ protected SystemConfig $systemConfig,
+ protected IAppConfig $appConfig,
+ ) {
parent::__construct();
- $this->systemConfig = $systemConfig;
- $this->appConfig = $appConfig;
}
protected function configure() {
use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
abstract class Base extends \OC\Core\Command\Base {
- protected SystemConfig $systemConfig;
-
- public function __construct(SystemConfig $systemConfig) {
+ public function __construct(protected SystemConfig $systemConfig) {
parent::__construct();
- $this->systemConfig = $systemConfig;
}
/**
use Symfony\Component\Console\Output\OutputInterface;
class Add extends Base {
- protected IGroupManager $groupManager;
-
- public function __construct(IGroupManager $groupManager) {
- $this->groupManager = $groupManager;
+ public function __construct(protected IGroupManager $groupManager) {
parent::__construct();
}
use Symfony\Component\Console\Output\OutputInterface;
class AddUser extends Base {
- protected IUserManager $userManager;
- protected IGroupManager $groupManager;
-
- public function __construct(IUserManager $userManager, IGroupManager $groupManager) {
- $this->userManager = $userManager;
- $this->groupManager = $groupManager;
+ public function __construct(
+ protected IUserManager $userManager,
+ protected IGroupManager $groupManager,
+ ) {
parent::__construct();
}
use Symfony\Component\Console\Output\OutputInterface;
class Delete extends Base {
- protected IGroupManager $groupManager;
-
- public function __construct(IGroupManager $groupManager) {
- $this->groupManager = $groupManager;
+ public function __construct(protected IGroupManager $groupManager) {
parent::__construct();
}
use Symfony\Component\Console\Output\OutputInterface;
class Info extends Base {
- protected IGroupManager $groupManager;
-
- public function __construct(IGroupManager $groupManager) {
- $this->groupManager = $groupManager;
+ public function __construct(protected IGroupManager $groupManager) {
parent::__construct();
}
use Symfony\Component\Console\Output\OutputInterface;
class ListCommand extends Base {
- protected IGroupManager $groupManager;
-
- public function __construct(IGroupManager $groupManager) {
- $this->groupManager = $groupManager;
+ public function __construct(protected IGroupManager $groupManager) {
parent::__construct();
}
use Symfony\Component\Console\Output\OutputInterface;
class RemoveUser extends Base {
- protected IUserManager $userManager;
- protected IGroupManager $groupManager;
-
- public function __construct(IUserManager $userManager, IGroupManager $groupManager) {
- $this->userManager = $userManager;
- $this->groupManager = $groupManager;
+ public function __construct(
+ protected IUserManager $userManager,
+ protected IGroupManager $groupManager,
+ ) {
parent::__construct();
}