Passed
Push — master ( 0815be...726d01 )
by Morris
16:26 queued 11s
created
lib/public/SystemTag/ISystemTag.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -32,70 +32,70 @@
 block discarded – undo
32 32
  * @since 9.0.0
33 33
  */
34 34
 interface ISystemTag {
35
-	/**
36
-	 * @since 22.0.0
37
-	 */
38
-	public const ACCESS_LEVEL_PUBLIC = 0;
39
-	/**
40
-	 * @since 22.0.0
41
-	 */
42
-	public const ACCESS_LEVEL_RESTRICTED = 1;
43
-	/**
44
-	 * @since 22.0.0
45
-	 */
46
-	public const ACCESS_LEVEL_INVISIBLE = 2;
35
+    /**
36
+     * @since 22.0.0
37
+     */
38
+    public const ACCESS_LEVEL_PUBLIC = 0;
39
+    /**
40
+     * @since 22.0.0
41
+     */
42
+    public const ACCESS_LEVEL_RESTRICTED = 1;
43
+    /**
44
+     * @since 22.0.0
45
+     */
46
+    public const ACCESS_LEVEL_INVISIBLE = 2;
47 47
 
48
-	/**
49
-	 * @since 22.0.0
50
-	 */
51
-	public const ACCESS_LEVEL_LOOKUP = [
52
-		ISystemTag::ACCESS_LEVEL_PUBLIC => 'public',
53
-		ISystemTag::ACCESS_LEVEL_RESTRICTED => 'restricted',
54
-		ISystemTag::ACCESS_LEVEL_INVISIBLE => 'invisible',
55
-	];
48
+    /**
49
+     * @since 22.0.0
50
+     */
51
+    public const ACCESS_LEVEL_LOOKUP = [
52
+        ISystemTag::ACCESS_LEVEL_PUBLIC => 'public',
53
+        ISystemTag::ACCESS_LEVEL_RESTRICTED => 'restricted',
54
+        ISystemTag::ACCESS_LEVEL_INVISIBLE => 'invisible',
55
+    ];
56 56
 
57
-	/**
58
-	 * Returns the tag id
59
-	 *
60
-	 * @return string id
61
-	 *
62
-	 * @since 9.0.0
63
-	 */
64
-	public function getId(): string;
57
+    /**
58
+     * Returns the tag id
59
+     *
60
+     * @return string id
61
+     *
62
+     * @since 9.0.0
63
+     */
64
+    public function getId(): string;
65 65
 
66
-	/**
67
-	 * Returns the tag display name
68
-	 *
69
-	 * @return string tag display name
70
-	 *
71
-	 * @since 9.0.0
72
-	 */
73
-	public function getName(): string;
66
+    /**
67
+     * Returns the tag display name
68
+     *
69
+     * @return string tag display name
70
+     *
71
+     * @since 9.0.0
72
+     */
73
+    public function getName(): string;
74 74
 
75
-	/**
76
-	 * Returns whether the tag is visible for regular users
77
-	 *
78
-	 * @return bool true if visible, false otherwise
79
-	 *
80
-	 * @since 9.0.0
81
-	 */
82
-	public function isUserVisible(): bool;
75
+    /**
76
+     * Returns whether the tag is visible for regular users
77
+     *
78
+     * @return bool true if visible, false otherwise
79
+     *
80
+     * @since 9.0.0
81
+     */
82
+    public function isUserVisible(): bool;
83 83
 
84
-	/**
85
-	 * Returns whether the tag can be assigned to objects by regular users
86
-	 *
87
-	 * @return bool true if assignable, false otherwise
88
-	 *
89
-	 * @since 9.0.0
90
-	 */
91
-	public function isUserAssignable(): bool;
84
+    /**
85
+     * Returns whether the tag can be assigned to objects by regular users
86
+     *
87
+     * @return bool true if assignable, false otherwise
88
+     *
89
+     * @since 9.0.0
90
+     */
91
+    public function isUserAssignable(): bool;
92 92
 
93
-	/**
94
-	 * Returns a term summarizing the access control flags
95
-	 *
96
-	 * @return int the level of access control
97
-	 *
98
-	 * @since 22.0.0
99
-	 */
100
-	public function getAccessLevel(): int;
93
+    /**
94
+     * Returns a term summarizing the access control flags
95
+     *
96
+     * @return int the level of access control
97
+     *
98
+     * @since 22.0.0
99
+     */
100
+    public function getAccessLevel(): int;
101 101
 }
Please login to merge, or discard this patch.
lib/private/SystemTag/SystemTag.php 1 patch
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -31,81 +31,81 @@
 block discarded – undo
31 31
 
32 32
 class SystemTag implements ISystemTag {
33 33
 
34
-	/**
35
-	 * @var string
36
-	 */
37
-	private $id;
34
+    /**
35
+     * @var string
36
+     */
37
+    private $id;
38 38
 
39
-	/**
40
-	 * @var string
41
-	 */
42
-	private $name;
39
+    /**
40
+     * @var string
41
+     */
42
+    private $name;
43 43
 
44
-	/**
45
-	 * @var bool
46
-	 */
47
-	private $userVisible;
44
+    /**
45
+     * @var bool
46
+     */
47
+    private $userVisible;
48 48
 
49
-	/**
50
-	 * @var bool
51
-	 */
52
-	private $userAssignable;
49
+    /**
50
+     * @var bool
51
+     */
52
+    private $userAssignable;
53 53
 
54
-	/**
55
-	 * Constructor.
56
-	 *
57
-	 * @param string $id tag id
58
-	 * @param string $name tag name
59
-	 * @param bool $userVisible whether the tag is user visible
60
-	 * @param bool $userAssignable whether the tag is user assignable
61
-	 */
62
-	public function __construct(string $id, string $name, bool $userVisible, bool $userAssignable) {
63
-		$this->id = $id;
64
-		$this->name = $name;
65
-		$this->userVisible = $userVisible;
66
-		$this->userAssignable = $userAssignable;
67
-	}
54
+    /**
55
+     * Constructor.
56
+     *
57
+     * @param string $id tag id
58
+     * @param string $name tag name
59
+     * @param bool $userVisible whether the tag is user visible
60
+     * @param bool $userAssignable whether the tag is user assignable
61
+     */
62
+    public function __construct(string $id, string $name, bool $userVisible, bool $userAssignable) {
63
+        $this->id = $id;
64
+        $this->name = $name;
65
+        $this->userVisible = $userVisible;
66
+        $this->userAssignable = $userAssignable;
67
+    }
68 68
 
69
-	/**
70
-	 * {@inheritdoc}
71
-	 */
72
-	public function getId(): string {
73
-		return $this->id;
74
-	}
69
+    /**
70
+     * {@inheritdoc}
71
+     */
72
+    public function getId(): string {
73
+        return $this->id;
74
+    }
75 75
 
76
-	/**
77
-	 * {@inheritdoc}
78
-	 */
79
-	public function getName(): string {
80
-		return $this->name;
81
-	}
76
+    /**
77
+     * {@inheritdoc}
78
+     */
79
+    public function getName(): string {
80
+        return $this->name;
81
+    }
82 82
 
83
-	/**
84
-	 * {@inheritdoc}
85
-	 */
86
-	public function isUserVisible(): bool {
87
-		return $this->userVisible;
88
-	}
83
+    /**
84
+     * {@inheritdoc}
85
+     */
86
+    public function isUserVisible(): bool {
87
+        return $this->userVisible;
88
+    }
89 89
 
90
-	/**
91
-	 * {@inheritdoc}
92
-	 */
93
-	public function isUserAssignable(): bool {
94
-		return $this->userAssignable;
95
-	}
90
+    /**
91
+     * {@inheritdoc}
92
+     */
93
+    public function isUserAssignable(): bool {
94
+        return $this->userAssignable;
95
+    }
96 96
 
97
-	/**
98
-	 * {@inheritdoc}
99
-	 */
100
-	public function getAccessLevel(): int {
101
-		if ($this->userVisible) {
102
-			if ($this->userAssignable) {
103
-				return self::ACCESS_LEVEL_PUBLIC;
104
-			} else {
105
-				return self::ACCESS_LEVEL_RESTRICTED;
106
-			}
107
-		} else {
108
-			return self::ACCESS_LEVEL_INVISIBLE;
109
-		}
110
-	}
97
+    /**
98
+     * {@inheritdoc}
99
+     */
100
+    public function getAccessLevel(): int {
101
+        if ($this->userVisible) {
102
+            if ($this->userAssignable) {
103
+                return self::ACCESS_LEVEL_PUBLIC;
104
+            } else {
105
+                return self::ACCESS_LEVEL_RESTRICTED;
106
+            }
107
+        } else {
108
+            return self::ACCESS_LEVEL_INVISIBLE;
109
+        }
110
+    }
111 111
 }
Please login to merge, or discard this patch.
core/Command/SystemTag/Edit.php 2 patches
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -33,87 +33,87 @@
 block discarded – undo
33 33
 
34 34
 class Edit extends Base {
35 35
 
36
-	/** @var ISystemTagManager */
37
-	protected $systemTagManager;
36
+    /** @var ISystemTagManager */
37
+    protected $systemTagManager;
38 38
 
39
-	/**
40
-	 * @param ISystemTagManager $systemTagManager
41
-	 */
42
-	public function __construct(ISystemTagManager $systemTagManager) {
43
-		$this->systemTagManager = $systemTagManager;
44
-		parent::__construct();
45
-	}
39
+    /**
40
+     * @param ISystemTagManager $systemTagManager
41
+     */
42
+    public function __construct(ISystemTagManager $systemTagManager) {
43
+        $this->systemTagManager = $systemTagManager;
44
+        parent::__construct();
45
+    }
46 46
 
47
-	protected function configure() {
48
-		$this
49
-			->setName('tag:edit')
50
-			->setDescription('edit tag attributes')
51
-			->addArgument(
52
-				'id',
53
-				InputOption::VALUE_REQUIRED,
54
-				'The ID of the tag that should be deleted',
55
-			)
56
-			->addOption(
57
-				'name',
58
-				null,
59
-				InputOption::VALUE_OPTIONAL,
60
-				'sets the \'name\' parameter',
61
-			)
62
-			->addOption(
63
-				'access',
64
-				null,
65
-				InputOption::VALUE_OPTIONAL,
66
-				'sets the access control level (public, restricted, invisible)',
67
-			);
68
-	}
47
+    protected function configure() {
48
+        $this
49
+            ->setName('tag:edit')
50
+            ->setDescription('edit tag attributes')
51
+            ->addArgument(
52
+                'id',
53
+                InputOption::VALUE_REQUIRED,
54
+                'The ID of the tag that should be deleted',
55
+            )
56
+            ->addOption(
57
+                'name',
58
+                null,
59
+                InputOption::VALUE_OPTIONAL,
60
+                'sets the \'name\' parameter',
61
+            )
62
+            ->addOption(
63
+                'access',
64
+                null,
65
+                InputOption::VALUE_OPTIONAL,
66
+                'sets the access control level (public, restricted, invisible)',
67
+            );
68
+    }
69 69
 
70
-	protected function execute(InputInterface $input, OutputInterface $output): int {
71
-		$tagArray = $this->systemTagManager->getTagsByIds($input->getArgument('id'));
72
-		// returns an array, but we always expect 0 or 1 results
70
+    protected function execute(InputInterface $input, OutputInterface $output): int {
71
+        $tagArray = $this->systemTagManager->getTagsByIds($input->getArgument('id'));
72
+        // returns an array, but we always expect 0 or 1 results
73 73
 
74
-		if (!$tagArray) {
75
-			$output->writeln('<error>Tag not found</error>');
76
-			return 3;
77
-		}
74
+        if (!$tagArray) {
75
+            $output->writeln('<error>Tag not found</error>');
76
+            return 3;
77
+        }
78 78
 
79
-		$tag = array_values($tagArray)[0];
80
-		$name = $tag->getName();
81
-		if (!empty($input->getOption('name'))) {
82
-			$name = $input->getOption('name');
83
-		}
79
+        $tag = array_values($tagArray)[0];
80
+        $name = $tag->getName();
81
+        if (!empty($input->getOption('name'))) {
82
+            $name = $input->getOption('name');
83
+        }
84 84
 
85
-		$userVisible = $tag->isUserVisible();
86
-		$userAssignable = $tag->isUserAssignable();
87
-		if ($input->getOption('access')) {
88
-			switch ($input->getOption('access')) {
89
-				case 'public':
90
-					$userVisible = true;
91
-					$userAssignable = true;
92
-					break;
93
-				case 'restricted':
94
-					$userVisible = true;
95
-					$userAssignable = false;
96
-					break;
97
-				case 'invisible':
98
-					$userVisible = false;
99
-					$userAssignable = false;
100
-					break;
101
-				default:
102
-					$output->writeln('<error>`access` property is invalid</error>');
103
-					return 1;
104
-			}
105
-		}
85
+        $userVisible = $tag->isUserVisible();
86
+        $userAssignable = $tag->isUserAssignable();
87
+        if ($input->getOption('access')) {
88
+            switch ($input->getOption('access')) {
89
+                case 'public':
90
+                    $userVisible = true;
91
+                    $userAssignable = true;
92
+                    break;
93
+                case 'restricted':
94
+                    $userVisible = true;
95
+                    $userAssignable = false;
96
+                    break;
97
+                case 'invisible':
98
+                    $userVisible = false;
99
+                    $userAssignable = false;
100
+                    break;
101
+                default:
102
+                    $output->writeln('<error>`access` property is invalid</error>');
103
+                    return 1;
104
+            }
105
+        }
106 106
 
107
-		try {
108
-			$this->systemTagManager->updateTag($input->getArgument('id'), $name, $userVisible, $userAssignable);
109
-			$output->writeln('<info>Tag updated ("' . $name . '", '. $userVisible . ', ' . $userAssignable . ')</info>');
110
-			return 0;
111
-		} catch (TagNotFoundException $e) {
112
-			$output->writeln('<error>Tag not found</error>');
113
-			return 1;
114
-		} catch (TagAlreadyExistsException $e) {
115
-			$output->writeln('<error>'.$e->getMessage().'</error>');
116
-			return 2;
117
-		}
118
-	}
107
+        try {
108
+            $this->systemTagManager->updateTag($input->getArgument('id'), $name, $userVisible, $userAssignable);
109
+            $output->writeln('<info>Tag updated ("' . $name . '", '. $userVisible . ', ' . $userAssignable . ')</info>');
110
+            return 0;
111
+        } catch (TagNotFoundException $e) {
112
+            $output->writeln('<error>Tag not found</error>');
113
+            return 1;
114
+        } catch (TagAlreadyExistsException $e) {
115
+            $output->writeln('<error>'.$e->getMessage().'</error>');
116
+            return 2;
117
+        }
118
+    }
119 119
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
 
107 107
 		try {
108 108
 			$this->systemTagManager->updateTag($input->getArgument('id'), $name, $userVisible, $userAssignable);
109
-			$output->writeln('<info>Tag updated ("' . $name . '", '. $userVisible . ', ' . $userAssignable . ')</info>');
109
+			$output->writeln('<info>Tag updated ("'.$name.'", '.$userVisible.', '.$userAssignable.')</info>');
110 110
 			return 0;
111 111
 		} catch (TagNotFoundException $e) {
112 112
 			$output->writeln('<error>Tag not found</error>');
Please login to merge, or discard this patch.
core/Command/SystemTag/Delete.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -32,33 +32,33 @@
 block discarded – undo
32 32
 
33 33
 class Delete extends Base {
34 34
 
35
-	/** @var ISystemTagManager */
36
-	protected $systemTagManager;
35
+    /** @var ISystemTagManager */
36
+    protected $systemTagManager;
37 37
 
38
-	public function __construct(ISystemTagManager $systemTagManager) {
39
-		$this->systemTagManager = $systemTagManager;
40
-		parent::__construct();
41
-	}
38
+    public function __construct(ISystemTagManager $systemTagManager) {
39
+        $this->systemTagManager = $systemTagManager;
40
+        parent::__construct();
41
+    }
42 42
 
43
-	protected function configure() {
44
-		$this
45
-			->setName('tag:delete')
46
-			->setDescription('delete a tag')
47
-			->addArgument(
48
-				'id',
49
-				InputOption::VALUE_REQUIRED,
50
-				'The ID of the tag that should be deleted',
51
-			);
52
-	}
43
+    protected function configure() {
44
+        $this
45
+            ->setName('tag:delete')
46
+            ->setDescription('delete a tag')
47
+            ->addArgument(
48
+                'id',
49
+                InputOption::VALUE_REQUIRED,
50
+                'The ID of the tag that should be deleted',
51
+            );
52
+    }
53 53
 
54
-	protected function execute(InputInterface $input, OutputInterface $output): int {
55
-		try {
56
-			$this->systemTagManager->deleteTags($input->getArgument('id'));
57
-			$output->writeln('<info>The specified tag was deleted</info>');
58
-			return 0;
59
-		} catch (TagNotFoundException $e) {
60
-			$output->writeln('<error>Tag not found</error>');
61
-			return 1;
62
-		}
63
-	}
54
+    protected function execute(InputInterface $input, OutputInterface $output): int {
55
+        try {
56
+            $this->systemTagManager->deleteTags($input->getArgument('id'));
57
+            $output->writeln('<info>The specified tag was deleted</info>');
58
+            return 0;
59
+        } catch (TagNotFoundException $e) {
60
+            $output->writeln('<error>Tag not found</error>');
61
+            return 1;
62
+        }
63
+    }
64 64
 }
Please login to merge, or discard this patch.
core/Command/SystemTag/ListCommand.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -32,54 +32,54 @@
 block discarded – undo
32 32
 
33 33
 class ListCommand extends Base {
34 34
 
35
-	/** @var ISystemTagManager */
36
-	protected $systemTagManager;
35
+    /** @var ISystemTagManager */
36
+    protected $systemTagManager;
37 37
 
38
-	public function __construct(ISystemTagManager $systemTagManager) {
39
-		$this->systemTagManager = $systemTagManager;
40
-		parent::__construct();
41
-	}
38
+    public function __construct(ISystemTagManager $systemTagManager) {
39
+        $this->systemTagManager = $systemTagManager;
40
+        parent::__construct();
41
+    }
42 42
 
43
-	protected function configure() {
44
-		$this
45
-			->setName('tag:list')
46
-			->setDescription('list tags')
47
-			->addOption(
48
-				'visibilityFilter',
49
-				null,
50
-				InputOption::VALUE_OPTIONAL,
51
-				'filter by visibility (1,0)'
52
-			)
53
-			->addOption(
54
-				'nameSearchPattern',
55
-				null,
56
-				InputOption::VALUE_OPTIONAL,
57
-				'optional search pattern for the tag name (infix)'
58
-			);
59
-		parent::configure();
60
-	}
43
+    protected function configure() {
44
+        $this
45
+            ->setName('tag:list')
46
+            ->setDescription('list tags')
47
+            ->addOption(
48
+                'visibilityFilter',
49
+                null,
50
+                InputOption::VALUE_OPTIONAL,
51
+                'filter by visibility (1,0)'
52
+            )
53
+            ->addOption(
54
+                'nameSearchPattern',
55
+                null,
56
+                InputOption::VALUE_OPTIONAL,
57
+                'optional search pattern for the tag name (infix)'
58
+            );
59
+        parent::configure();
60
+    }
61 61
 
62
-	protected function execute(InputInterface $input, OutputInterface $output): int {
63
-		$tags = $this->systemTagManager->getAllTags(
64
-			$input->getOption('visibilityFilter'),
65
-			$input->getOption('nameSearchPattern')
66
-		);
62
+    protected function execute(InputInterface $input, OutputInterface $output): int {
63
+        $tags = $this->systemTagManager->getAllTags(
64
+            $input->getOption('visibilityFilter'),
65
+            $input->getOption('nameSearchPattern')
66
+        );
67 67
 
68
-		$this->writeArrayInOutputFormat($input, $output, $this->formatTags($tags));
69
-		return 0;
70
-	}
68
+        $this->writeArrayInOutputFormat($input, $output, $this->formatTags($tags));
69
+        return 0;
70
+    }
71 71
 
72
-	/**
73
-	 * @param ISystemtag[] $tags
74
-	 * @return array
75
-	 */
76
-	private function formatTags(array $tags) {
77
-		foreach ($tags as $tag) {
78
-			$result[$tag->getId()] = [
79
-				'name' => $tag->getName(),
80
-				'access' => ISystemTag::ACCESS_LEVEL_LOOKUP[$tag->getAccessLevel()],
81
-			];
82
-		}
83
-		return $result;
84
-	}
72
+    /**
73
+     * @param ISystemtag[] $tags
74
+     * @return array
75
+     */
76
+    private function formatTags(array $tags) {
77
+        foreach ($tags as $tag) {
78
+            $result[$tag->getId()] = [
79
+                'name' => $tag->getName(),
80
+                'access' => ISystemTag::ACCESS_LEVEL_LOOKUP[$tag->getAccessLevel()],
81
+            ];
82
+        }
83
+        return $result;
84
+    }
85 85
 }
Please login to merge, or discard this patch.
core/Command/SystemTag/Add.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -33,69 +33,69 @@
 block discarded – undo
33 33
 
34 34
 class Add extends Base {
35 35
 
36
-	/** @var ISystemTagManager */
37
-	protected $systemTagManager;
36
+    /** @var ISystemTagManager */
37
+    protected $systemTagManager;
38 38
 
39
-	public function __construct(ISystemTagManager $systemTagManager) {
40
-		$this->systemTagManager = $systemTagManager;
41
-		parent::__construct();
42
-	}
39
+    public function __construct(ISystemTagManager $systemTagManager) {
40
+        $this->systemTagManager = $systemTagManager;
41
+        parent::__construct();
42
+    }
43 43
 
44
-	protected function configure() {
45
-		$this
46
-			->setName('tag:add')
47
-			->setDescription('Add new tag')
48
-			->addArgument(
49
-				'name',
50
-				InputArgument::REQUIRED,
51
-				'name of the tag',
52
-			)
53
-			->addArgument(
54
-				'access',
55
-				InputArgument::REQUIRED,
56
-				'access level of the tag (public, restricted or invisible)',
57
-			);
58
-		parent::configure();
59
-	}
44
+    protected function configure() {
45
+        $this
46
+            ->setName('tag:add')
47
+            ->setDescription('Add new tag')
48
+            ->addArgument(
49
+                'name',
50
+                InputArgument::REQUIRED,
51
+                'name of the tag',
52
+            )
53
+            ->addArgument(
54
+                'access',
55
+                InputArgument::REQUIRED,
56
+                'access level of the tag (public, restricted or invisible)',
57
+            );
58
+        parent::configure();
59
+    }
60 60
 
61
-	protected function execute(InputInterface $input, OutputInterface $output): int {
62
-		$name = $input->getArgument('name');
63
-		if ($name === '') {
64
-			$output->writeln('<error>`name` can\'t be empty</error>');
65
-			return 3;
66
-		}
61
+    protected function execute(InputInterface $input, OutputInterface $output): int {
62
+        $name = $input->getArgument('name');
63
+        if ($name === '') {
64
+            $output->writeln('<error>`name` can\'t be empty</error>');
65
+            return 3;
66
+        }
67 67
 
68
-		switch ($input->getArgument('access')) {
69
-			case 'public':
70
-				$userVisible = true;
71
-				$userAssignable = true;
72
-				break;
73
-			case 'restricted':
74
-				$userVisible = true;
75
-				$userAssignable = false;
76
-				break;
77
-			case 'invisible':
78
-				$userVisible = false;
79
-				$userAssignable = false;
80
-				break;
81
-			default:
82
-				$output->writeln('<error>`access` property is invalid</error>');
83
-				return 1;
84
-		}
68
+        switch ($input->getArgument('access')) {
69
+            case 'public':
70
+                $userVisible = true;
71
+                $userAssignable = true;
72
+                break;
73
+            case 'restricted':
74
+                $userVisible = true;
75
+                $userAssignable = false;
76
+                break;
77
+            case 'invisible':
78
+                $userVisible = false;
79
+                $userAssignable = false;
80
+                break;
81
+            default:
82
+                $output->writeln('<error>`access` property is invalid</error>');
83
+                return 1;
84
+        }
85 85
 
86
-		try {
87
-			$tag = $this->systemTagManager->createTag($name, $userVisible, $userAssignable);
86
+        try {
87
+            $tag = $this->systemTagManager->createTag($name, $userVisible, $userAssignable);
88 88
 
89
-			$this->writeArrayInOutputFormat($input, $output,
90
-				[
91
-					'id' => $tag->getId(),
92
-					'name' => $tag->getName(),
93
-					'access' => ISystemTag::ACCESS_LEVEL_LOOKUP[$tag->getAccessLevel()],
94
-				]);
95
-			return 0;
96
-		} catch (TagAlreadyExistsException $e) {
97
-			$output->writeln('<error>'.$e->getMessage().'</error>');
98
-			return 2;
99
-		}
100
-	}
89
+            $this->writeArrayInOutputFormat($input, $output,
90
+                [
91
+                    'id' => $tag->getId(),
92
+                    'name' => $tag->getName(),
93
+                    'access' => ISystemTag::ACCESS_LEVEL_LOOKUP[$tag->getAccessLevel()],
94
+                ]);
95
+            return 0;
96
+        } catch (TagAlreadyExistsException $e) {
97
+            $output->writeln('<error>'.$e->getMessage().'</error>');
98
+            return 2;
99
+        }
100
+    }
101 101
 }
Please login to merge, or discard this patch.
core/register_command.php 1 patch
Indentation   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -57,151 +57,151 @@
 block discarded – undo
57 57
 $application->add(new OC\Core\Command\App\CheckCode());
58 58
 $application->add(new OC\Core\Command\L10n\CreateJs());
59 59
 $application->add(new \OC\Core\Command\Integrity\SignApp(
60
-		\OC::$server->getIntegrityCodeChecker(),
61
-		new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
62
-		\OC::$server->getURLGenerator()
60
+        \OC::$server->getIntegrityCodeChecker(),
61
+        new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
62
+        \OC::$server->getURLGenerator()
63 63
 ));
64 64
 $application->add(new \OC\Core\Command\Integrity\SignCore(
65
-		\OC::$server->getIntegrityCodeChecker(),
66
-		new \OC\IntegrityCheck\Helpers\FileAccessHelper()
65
+        \OC::$server->getIntegrityCodeChecker(),
66
+        new \OC\IntegrityCheck\Helpers\FileAccessHelper()
67 67
 ));
68 68
 $application->add(new \OC\Core\Command\Integrity\CheckApp(
69
-		\OC::$server->getIntegrityCodeChecker()
69
+        \OC::$server->getIntegrityCodeChecker()
70 70
 ));
71 71
 $application->add(new \OC\Core\Command\Integrity\CheckCore(
72
-		\OC::$server->getIntegrityCodeChecker()
72
+        \OC::$server->getIntegrityCodeChecker()
73 73
 ));
74 74
 
75 75
 
76 76
 if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
77
-	$application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager()));
78
-	$application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager()));
79
-	$application->add(new OC\Core\Command\App\Install());
80
-	$application->add(new OC\Core\Command\App\GetPath());
81
-	$application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
82
-	$application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger()));
83
-	$application->add(\OC::$server->query(\OC\Core\Command\App\Update::class));
84
-
85
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class));
86
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class));
87
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class));
88
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class));
89
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class));
90
-
91
-	$application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));
92
-	$application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig()));
93
-	$application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig()));
94
-
95
-	$application->add(\OC::$server->query(\OC\Core\Command\Broadcast\Test::class));
96
-
97
-	$application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig()));
98
-	$application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig()));
99
-	$application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig()));
100
-	$application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig()));
101
-	$application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig()));
102
-	$application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig()));
103
-	$application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig()));
104
-	$application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig()));
105
-
106
-	$application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig())));
107
-	$application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger()));
108
-	$application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->get(\OC\DB\Connection::class)));
109
-	$application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher()));
110
-	$application->add(new OC\Core\Command\Db\AddMissingColumns(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher()));
111
-	$application->add(new OC\Core\Command\Db\AddMissingPrimaryKeys(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher()));
112
-	$application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->get(\OC\DB\Connection::class)));
113
-	$application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->get(\OC\DB\Connection::class)));
114
-	$application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getAppManager()));
115
-	$application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getConfig()));
116
-
117
-	$application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig()));
118
-	$application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager()));
119
-	$application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
120
-	$application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
121
-	$application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager()));
122
-	$application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper()));
123
-	$application->add(new OC\Core\Command\Encryption\DecryptAll(
124
-		\OC::$server->getEncryptionManager(),
125
-		\OC::$server->getAppManager(),
126
-		\OC::$server->getConfig(),
127
-		new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()),
128
-		new \Symfony\Component\Console\Helper\QuestionHelper())
129
-	);
130
-
131
-	$application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig()));
132
-	$application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig()));
133
-
134
-	$view = new \OC\Files\View();
135
-	$util = new \OC\Encryption\Util(
136
-		$view,
137
-		\OC::$server->getUserManager(),
138
-		\OC::$server->getGroupManager(),
139
-		\OC::$server->getConfig()
140
-	);
141
-	$application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot(
142
-			$view,
143
-			\OC::$server->getUserManager(),
144
-			\OC::$server->getConfig(),
145
-			$util,
146
-			new \Symfony\Component\Console\Helper\QuestionHelper()
147
-		)
148
-	);
149
-	$application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util));
150
-	$application->add(new OC\Core\Command\Encryption\MigrateKeyStorage(
151
-			$view,
152
-			\OC::$server->getUserManager(),
153
-			\OC::$server->getConfig(),
154
-			$util,
155
-			\OC::$server->getCrypto()
156
-		)
157
-	);
158
-
159
-	$application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory()));
160
-	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader()));
161
-	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector()));
162
-	$application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
163
-	$application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
164
-	$application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
165
-
166
-	$application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), \OC::$server->query(\OC\Installer::class)));
167
-	$application->add(new OC\Core\Command\Maintenance\Repair(
168
-		new \OC\Repair([], \OC::$server->getEventDispatcher(), \OC::$server->get(LoggerInterface::class)),
169
-		\OC::$server->getConfig(),
170
-		\OC::$server->getEventDispatcher(),
171
-		\OC::$server->getAppManager()
172
-	));
173
-
174
-	$application->add(\OC::$server->query(\OC\Core\Command\Preview\Repair::class));
175
-	$application->add(\OC::$server->query(\OC\Core\Command\Preview\ResetRenderedTexts::class));
176
-
177
-	$application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
178
-	$application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
179
-	$application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager()));
180
-	$application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager()));
181
-	$application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager()));
182
-	$application->add(\OC::$server->get(\OC\Core\Command\User\Report::class));
183
-	$application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
184
-	$application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection()));
185
-	$application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
186
-	$application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
187
-	$application->add(new OC\Core\Command\User\AddAppPassword(\OC::$server->get(\OCP\IUserManager::class), \OC::$server->get(\OC\Authentication\Token\IProvider::class), \OC::$server->get(\OCP\Security\ISecureRandom::class), \OC::$server->get(\OCP\Security\ICrypto::class)));
188
-
189
-	$application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager()));
190
-	$application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager()));
191
-	$application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager()));
192
-	$application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
193
-	$application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
194
-	$application->add(new OC\Core\Command\Group\Info(\OC::$server->get(\OCP\IGroupManager::class)));
195
-
196
-	$application->add(new OC\Core\Command\SystemTag\ListCommand(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
197
-	$application->add(new OC\Core\Command\SystemTag\Delete(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
198
-	$application->add(new OC\Core\Command\SystemTag\Add(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
199
-	$application->add(new OC\Core\Command\SystemTag\Edit(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
200
-
201
-	$application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(), \OC::$server->getL10N('core')));
202
-	$application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager()));
203
-	$application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager()));
204
-	$application->add(new OC\Core\Command\Security\ResetBruteforceAttempts(\OC::$server->getBruteForceThrottler()));
77
+    $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager()));
78
+    $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager()));
79
+    $application->add(new OC\Core\Command\App\Install());
80
+    $application->add(new OC\Core\Command\App\GetPath());
81
+    $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
82
+    $application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger()));
83
+    $application->add(\OC::$server->query(\OC\Core\Command\App\Update::class));
84
+
85
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class));
86
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class));
87
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class));
88
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class));
89
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class));
90
+
91
+    $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));
92
+    $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig()));
93
+    $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig()));
94
+
95
+    $application->add(\OC::$server->query(\OC\Core\Command\Broadcast\Test::class));
96
+
97
+    $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig()));
98
+    $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig()));
99
+    $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig()));
100
+    $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig()));
101
+    $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig()));
102
+    $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig()));
103
+    $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig()));
104
+    $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig()));
105
+
106
+    $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig())));
107
+    $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger()));
108
+    $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->get(\OC\DB\Connection::class)));
109
+    $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher()));
110
+    $application->add(new OC\Core\Command\Db\AddMissingColumns(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher()));
111
+    $application->add(new OC\Core\Command\Db\AddMissingPrimaryKeys(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getEventDispatcher()));
112
+    $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->get(\OC\DB\Connection::class)));
113
+    $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->get(\OC\DB\Connection::class)));
114
+    $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getAppManager()));
115
+    $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getConfig()));
116
+
117
+    $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig()));
118
+    $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager()));
119
+    $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
120
+    $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
121
+    $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager()));
122
+    $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper()));
123
+    $application->add(new OC\Core\Command\Encryption\DecryptAll(
124
+        \OC::$server->getEncryptionManager(),
125
+        \OC::$server->getAppManager(),
126
+        \OC::$server->getConfig(),
127
+        new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()),
128
+        new \Symfony\Component\Console\Helper\QuestionHelper())
129
+    );
130
+
131
+    $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig()));
132
+    $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig()));
133
+
134
+    $view = new \OC\Files\View();
135
+    $util = new \OC\Encryption\Util(
136
+        $view,
137
+        \OC::$server->getUserManager(),
138
+        \OC::$server->getGroupManager(),
139
+        \OC::$server->getConfig()
140
+    );
141
+    $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot(
142
+            $view,
143
+            \OC::$server->getUserManager(),
144
+            \OC::$server->getConfig(),
145
+            $util,
146
+            new \Symfony\Component\Console\Helper\QuestionHelper()
147
+        )
148
+    );
149
+    $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util));
150
+    $application->add(new OC\Core\Command\Encryption\MigrateKeyStorage(
151
+            $view,
152
+            \OC::$server->getUserManager(),
153
+            \OC::$server->getConfig(),
154
+            $util,
155
+            \OC::$server->getCrypto()
156
+        )
157
+    );
158
+
159
+    $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory()));
160
+    $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader()));
161
+    $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector()));
162
+    $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
163
+    $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
164
+    $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
165
+
166
+    $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), \OC::$server->query(\OC\Installer::class)));
167
+    $application->add(new OC\Core\Command\Maintenance\Repair(
168
+        new \OC\Repair([], \OC::$server->getEventDispatcher(), \OC::$server->get(LoggerInterface::class)),
169
+        \OC::$server->getConfig(),
170
+        \OC::$server->getEventDispatcher(),
171
+        \OC::$server->getAppManager()
172
+    ));
173
+
174
+    $application->add(\OC::$server->query(\OC\Core\Command\Preview\Repair::class));
175
+    $application->add(\OC::$server->query(\OC\Core\Command\Preview\ResetRenderedTexts::class));
176
+
177
+    $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
178
+    $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
179
+    $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager()));
180
+    $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager()));
181
+    $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager()));
182
+    $application->add(\OC::$server->get(\OC\Core\Command\User\Report::class));
183
+    $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
184
+    $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection()));
185
+    $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
186
+    $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
187
+    $application->add(new OC\Core\Command\User\AddAppPassword(\OC::$server->get(\OCP\IUserManager::class), \OC::$server->get(\OC\Authentication\Token\IProvider::class), \OC::$server->get(\OCP\Security\ISecureRandom::class), \OC::$server->get(\OCP\Security\ICrypto::class)));
188
+
189
+    $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager()));
190
+    $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager()));
191
+    $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager()));
192
+    $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
193
+    $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
194
+    $application->add(new OC\Core\Command\Group\Info(\OC::$server->get(\OCP\IGroupManager::class)));
195
+
196
+    $application->add(new OC\Core\Command\SystemTag\ListCommand(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
197
+    $application->add(new OC\Core\Command\SystemTag\Delete(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
198
+    $application->add(new OC\Core\Command\SystemTag\Add(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
199
+    $application->add(new OC\Core\Command\SystemTag\Edit(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
200
+
201
+    $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(), \OC::$server->getL10N('core')));
202
+    $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager()));
203
+    $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager()));
204
+    $application->add(new OC\Core\Command\Security\ResetBruteforceAttempts(\OC::$server->getBruteForceThrottler()));
205 205
 } else {
206
-	$application->add(\OC::$server->get(\OC\Core\Command\Maintenance\Install::class));
206
+    $application->add(\OC::$server->get(\OC\Core\Command\Maintenance\Install::class));
207 207
 }
Please login to merge, or discard this patch.