Passed
Push — master ( 45c27a...565ee0 )
by Robin
17:59 queued 13s
created
core/register_command.php 1 patch
Indentation   +143 added lines, -143 removed lines patch added patch discarded remove patch
@@ -55,158 +55,158 @@
 block discarded – undo
55 55
 $application->add(new OC\Core\Command\Check(\OC::$server->getSystemConfig()));
56 56
 $application->add(new OC\Core\Command\L10n\CreateJs());
57 57
 $application->add(new \OC\Core\Command\Integrity\SignApp(
58
-	\OC::$server->getIntegrityCodeChecker(),
59
-	new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
60
-	\OC::$server->getURLGenerator()
58
+    \OC::$server->getIntegrityCodeChecker(),
59
+    new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
60
+    \OC::$server->getURLGenerator()
61 61
 ));
62 62
 $application->add(new \OC\Core\Command\Integrity\SignCore(
63
-	\OC::$server->getIntegrityCodeChecker(),
64
-	new \OC\IntegrityCheck\Helpers\FileAccessHelper()
63
+    \OC::$server->getIntegrityCodeChecker(),
64
+    new \OC\IntegrityCheck\Helpers\FileAccessHelper()
65 65
 ));
66 66
 $application->add(new \OC\Core\Command\Integrity\CheckApp(
67
-	\OC::$server->getIntegrityCodeChecker()
67
+    \OC::$server->getIntegrityCodeChecker()
68 68
 ));
69 69
 $application->add(new \OC\Core\Command\Integrity\CheckCore(
70
-	\OC::$server->getIntegrityCodeChecker()
70
+    \OC::$server->getIntegrityCodeChecker()
71 71
 ));
72 72
 
73 73
 
74 74
 if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
75
-	$application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager()));
76
-	$application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager()));
77
-	$application->add(new OC\Core\Command\App\Install());
78
-	$application->add(new OC\Core\Command\App\GetPath());
79
-	$application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
80
-	$application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->get(LoggerInterface::class)));
81
-	$application->add(\OC::$server->query(\OC\Core\Command\App\Update::class));
82
-
83
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class));
84
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class));
85
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class));
86
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class));
87
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class));
88
-
89
-	$application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));
90
-	$application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig()));
91
-	$application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig()));
92
-	$application->add(new OC\Core\Command\Background\Job(\OC::$server->getJobList(), \OC::$server->getLogger()));
93
-	$application->add(new OC\Core\Command\Background\ListCommand(\OC::$server->getJobList()));
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->get(LoggerInterface::class)));
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
-
113
-	if (\OC::$server->getConfig()->getSystemValueBool('debug', false)) {
114
-		$application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->get(\OC\DB\Connection::class)));
115
-		$application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->get(\OC\DB\Connection::class)));
116
-		$application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getAppManager()));
117
-		$application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getConfig()));
118
-	}
119
-
120
-	$application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig()));
121
-	$application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager()));
122
-	$application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
123
-	$application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
124
-	$application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager()));
125
-	$application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper()));
126
-	$application->add(new OC\Core\Command\Encryption\DecryptAll(
127
-		\OC::$server->getEncryptionManager(),
128
-		\OC::$server->getAppManager(),
129
-		\OC::$server->getConfig(),
130
-		new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()),
131
-		new \Symfony\Component\Console\Helper\QuestionHelper())
132
-	);
133
-
134
-	$application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig()));
135
-	$application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig()));
136
-
137
-	$view = new \OC\Files\View();
138
-	$util = new \OC\Encryption\Util(
139
-		$view,
140
-		\OC::$server->getUserManager(),
141
-		\OC::$server->getGroupManager(),
142
-		\OC::$server->getConfig()
143
-	);
144
-	$application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot(
145
-		$view,
146
-		\OC::$server->getUserManager(),
147
-		\OC::$server->getConfig(),
148
-		$util,
149
-		new \Symfony\Component\Console\Helper\QuestionHelper()
150
-	)
151
-	);
152
-	$application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util));
153
-	$application->add(new OC\Core\Command\Encryption\MigrateKeyStorage(
154
-		$view,
155
-		\OC::$server->getUserManager(),
156
-		\OC::$server->getConfig(),
157
-		$util,
158
-		\OC::$server->getCrypto()
159
-	)
160
-	);
161
-
162
-	$application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory()));
163
-	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader()));
164
-	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector()));
165
-	$application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
166
-	$application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
167
-	$application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
168
-
169
-	$application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), \OC::$server->query(\OC\Installer::class)));
170
-	$application->add(new OC\Core\Command\Maintenance\Repair(
171
-		new \OC\Repair([], \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class), \OC::$server->get(LoggerInterface::class)),
172
-		\OC::$server->getConfig(),
173
-		\OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),
174
-		\OC::$server->getAppManager()
175
-	));
176
-	$application->add(\OC::$server->query(OC\Core\Command\Maintenance\RepairShareOwnership::class));
177
-
178
-	$application->add(\OC::$server->get(\OC\Core\Command\Preview\Generate::class));
179
-	$application->add(\OC::$server->query(\OC\Core\Command\Preview\Repair::class));
180
-	$application->add(\OC::$server->query(\OC\Core\Command\Preview\ResetRenderedTexts::class));
181
-
182
-	$application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
183
-	$application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
184
-	$application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager()));
185
-	$application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager()));
186
-	$application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager()));
187
-	$application->add(\OC::$server->get(\OC\Core\Command\User\Report::class));
188
-	$application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager(), \OC::$server->getAppManager()));
189
-	$application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig()));
190
-	$application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
191
-	$application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
192
-	$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\EventDispatcher\IEventDispatcher::class)));
193
-
194
-	$application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager()));
195
-	$application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager()));
196
-	$application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager()));
197
-	$application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
198
-	$application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
199
-	$application->add(new OC\Core\Command\Group\Info(\OC::$server->get(\OCP\IGroupManager::class)));
200
-
201
-	$application->add(new OC\Core\Command\SystemTag\ListCommand(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
202
-	$application->add(new OC\Core\Command\SystemTag\Delete(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
203
-	$application->add(new OC\Core\Command\SystemTag\Add(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
204
-	$application->add(new OC\Core\Command\SystemTag\Edit(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
205
-
206
-	$application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(), \OC::$server->getL10N('core')));
207
-	$application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager()));
208
-	$application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager()));
209
-	$application->add(new OC\Core\Command\Security\ResetBruteforceAttempts(\OC::$server->getBruteForceThrottler()));
75
+    $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager()));
76
+    $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager()));
77
+    $application->add(new OC\Core\Command\App\Install());
78
+    $application->add(new OC\Core\Command\App\GetPath());
79
+    $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
80
+    $application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->get(LoggerInterface::class)));
81
+    $application->add(\OC::$server->query(\OC\Core\Command\App\Update::class));
82
+
83
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class));
84
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class));
85
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class));
86
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class));
87
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class));
88
+
89
+    $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));
90
+    $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig()));
91
+    $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig()));
92
+    $application->add(new OC\Core\Command\Background\Job(\OC::$server->getJobList(), \OC::$server->getLogger()));
93
+    $application->add(new OC\Core\Command\Background\ListCommand(\OC::$server->getJobList()));
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->get(LoggerInterface::class)));
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
+
113
+    if (\OC::$server->getConfig()->getSystemValueBool('debug', false)) {
114
+        $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->get(\OC\DB\Connection::class)));
115
+        $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->get(\OC\DB\Connection::class)));
116
+        $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getAppManager()));
117
+        $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->get(\OC\DB\Connection::class), \OC::$server->getConfig()));
118
+    }
119
+
120
+    $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig()));
121
+    $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager()));
122
+    $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
123
+    $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager(), \OC::$server->getConfig()));
124
+    $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager()));
125
+    $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper()));
126
+    $application->add(new OC\Core\Command\Encryption\DecryptAll(
127
+        \OC::$server->getEncryptionManager(),
128
+        \OC::$server->getAppManager(),
129
+        \OC::$server->getConfig(),
130
+        new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()),
131
+        new \Symfony\Component\Console\Helper\QuestionHelper())
132
+    );
133
+
134
+    $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig()));
135
+    $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig()));
136
+
137
+    $view = new \OC\Files\View();
138
+    $util = new \OC\Encryption\Util(
139
+        $view,
140
+        \OC::$server->getUserManager(),
141
+        \OC::$server->getGroupManager(),
142
+        \OC::$server->getConfig()
143
+    );
144
+    $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot(
145
+        $view,
146
+        \OC::$server->getUserManager(),
147
+        \OC::$server->getConfig(),
148
+        $util,
149
+        new \Symfony\Component\Console\Helper\QuestionHelper()
150
+    )
151
+    );
152
+    $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util));
153
+    $application->add(new OC\Core\Command\Encryption\MigrateKeyStorage(
154
+        $view,
155
+        \OC::$server->getUserManager(),
156
+        \OC::$server->getConfig(),
157
+        $util,
158
+        \OC::$server->getCrypto()
159
+    )
160
+    );
161
+
162
+    $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory()));
163
+    $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader()));
164
+    $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector()));
165
+    $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
166
+    $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
167
+    $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
168
+
169
+    $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), \OC::$server->query(\OC\Installer::class)));
170
+    $application->add(new OC\Core\Command\Maintenance\Repair(
171
+        new \OC\Repair([], \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class), \OC::$server->get(LoggerInterface::class)),
172
+        \OC::$server->getConfig(),
173
+        \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class),
174
+        \OC::$server->getAppManager()
175
+    ));
176
+    $application->add(\OC::$server->query(OC\Core\Command\Maintenance\RepairShareOwnership::class));
177
+
178
+    $application->add(\OC::$server->get(\OC\Core\Command\Preview\Generate::class));
179
+    $application->add(\OC::$server->query(\OC\Core\Command\Preview\Repair::class));
180
+    $application->add(\OC::$server->query(\OC\Core\Command\Preview\ResetRenderedTexts::class));
181
+
182
+    $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
183
+    $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
184
+    $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager()));
185
+    $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager()));
186
+    $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager()));
187
+    $application->add(\OC::$server->get(\OC\Core\Command\User\Report::class));
188
+    $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager(), \OC::$server->getAppManager()));
189
+    $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig()));
190
+    $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
191
+    $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
192
+    $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\EventDispatcher\IEventDispatcher::class)));
193
+
194
+    $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager()));
195
+    $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager()));
196
+    $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager()));
197
+    $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
198
+    $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
199
+    $application->add(new OC\Core\Command\Group\Info(\OC::$server->get(\OCP\IGroupManager::class)));
200
+
201
+    $application->add(new OC\Core\Command\SystemTag\ListCommand(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
202
+    $application->add(new OC\Core\Command\SystemTag\Delete(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
203
+    $application->add(new OC\Core\Command\SystemTag\Add(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
204
+    $application->add(new OC\Core\Command\SystemTag\Edit(\OC::$server->get(\OCP\SystemTag\ISystemTagManager::class)));
205
+
206
+    $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(), \OC::$server->getL10N('core')));
207
+    $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager()));
208
+    $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager()));
209
+    $application->add(new OC\Core\Command\Security\ResetBruteforceAttempts(\OC::$server->getBruteForceThrottler()));
210 210
 } else {
211
-	$application->add(\OC::$server->get(\OC\Core\Command\Maintenance\Install::class));
211
+    $application->add(\OC::$server->get(\OC\Core\Command\Maintenance\Install::class));
212 212
 }
Please login to merge, or discard this patch.
core/Command/Preview/Generate.php 2 patches
Indentation   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -36,106 +36,106 @@
 block discarded – undo
36 36
 use Symfony\Component\Console\Output\OutputInterface;
37 37
 
38 38
 class Generate extends Command {
39
-	private IRootFolder $rootFolder;
40
-	private IUserMountCache $userMountCache;
41
-	private IPreview $previewManager;
39
+    private IRootFolder $rootFolder;
40
+    private IUserMountCache $userMountCache;
41
+    private IPreview $previewManager;
42 42
 
43
-	public function __construct(IRootFolder $rootFolder, IUserMountCache $userMountCache, IPreview $previewManager) {
44
-		$this->rootFolder = $rootFolder;
45
-		$this->userMountCache = $userMountCache;
46
-		$this->previewManager = $previewManager;
43
+    public function __construct(IRootFolder $rootFolder, IUserMountCache $userMountCache, IPreview $previewManager) {
44
+        $this->rootFolder = $rootFolder;
45
+        $this->userMountCache = $userMountCache;
46
+        $this->previewManager = $previewManager;
47 47
 
48
-		parent::__construct();
49
-	}
48
+        parent::__construct();
49
+    }
50 50
 
51
-	protected function configure() {
52
-		$this
53
-			->setName('preview:generate')
54
-			->setDescription('generate a preview for a file')
55
-			->addArgument("file", InputArgument::REQUIRED, "path or fileid of the file to generate the preview for")
56
-			->addOption("size", "s", InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, "size to generate the preview for in pixels, defaults to 64x64", ["64x64"])
57
-			->addOption("crop", "c", InputOption::VALUE_NONE, "crop the previews instead of maintaining aspect ratio")
58
-			->addOption("mode", "m", InputOption::VALUE_REQUIRED, "mode for generating uncropped previews, 'cover' or 'fill'", IPreview::MODE_FILL);
59
-	}
51
+    protected function configure() {
52
+        $this
53
+            ->setName('preview:generate')
54
+            ->setDescription('generate a preview for a file')
55
+            ->addArgument("file", InputArgument::REQUIRED, "path or fileid of the file to generate the preview for")
56
+            ->addOption("size", "s", InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, "size to generate the preview for in pixels, defaults to 64x64", ["64x64"])
57
+            ->addOption("crop", "c", InputOption::VALUE_NONE, "crop the previews instead of maintaining aspect ratio")
58
+            ->addOption("mode", "m", InputOption::VALUE_REQUIRED, "mode for generating uncropped previews, 'cover' or 'fill'", IPreview::MODE_FILL);
59
+    }
60 60
 
61
-	protected function execute(InputInterface $input, OutputInterface $output): int {
62
-		$fileInput = $input->getArgument("file");
63
-		$sizes = $input->getOption("size");
64
-		$sizes = array_map(function (string $size) use ($output, &$error) {
65
-			if (str_contains($size, 'x')) {
66
-				$sizeParts = explode('x', $size, 2);
67
-			} else {
68
-				$sizeParts = [$size, $size];
69
-			}
70
-			if (!is_numeric($sizeParts[0]) || !is_numeric($sizeParts[1])) {
71
-				$output->writeln("<error>Invalid size $size</error>");
72
-				return null;
73
-			}
61
+    protected function execute(InputInterface $input, OutputInterface $output): int {
62
+        $fileInput = $input->getArgument("file");
63
+        $sizes = $input->getOption("size");
64
+        $sizes = array_map(function (string $size) use ($output, &$error) {
65
+            if (str_contains($size, 'x')) {
66
+                $sizeParts = explode('x', $size, 2);
67
+            } else {
68
+                $sizeParts = [$size, $size];
69
+            }
70
+            if (!is_numeric($sizeParts[0]) || !is_numeric($sizeParts[1])) {
71
+                $output->writeln("<error>Invalid size $size</error>");
72
+                return null;
73
+            }
74 74
 
75
-			return array_map("intval", $sizeParts);
76
-		}, $sizes);
77
-		if (in_array(null, $sizes)) {
78
-			return 1;
79
-		}
75
+            return array_map("intval", $sizeParts);
76
+        }, $sizes);
77
+        if (in_array(null, $sizes)) {
78
+            return 1;
79
+        }
80 80
 
81
-		$mode = $input->getOption("mode");
82
-		if ($mode !== IPreview::MODE_FILL && $mode !== IPreview::MODE_COVER) {
83
-			$output->writeln("<error>Invalid mode $mode</error>");
84
-			return 1;
85
-		}
86
-		$crop = $input->getOption("crop");
87
-		$file = $this->getFile($fileInput);
88
-		if (!$file) {
89
-			$output->writeln("<error>File $fileInput not found</error>");
90
-			return 1;
91
-		}
92
-		if (!$file instanceof File) {
93
-			$output->writeln("<error>Can't generate previews for folders</error>");
94
-			return 1;
95
-		}
81
+        $mode = $input->getOption("mode");
82
+        if ($mode !== IPreview::MODE_FILL && $mode !== IPreview::MODE_COVER) {
83
+            $output->writeln("<error>Invalid mode $mode</error>");
84
+            return 1;
85
+        }
86
+        $crop = $input->getOption("crop");
87
+        $file = $this->getFile($fileInput);
88
+        if (!$file) {
89
+            $output->writeln("<error>File $fileInput not found</error>");
90
+            return 1;
91
+        }
92
+        if (!$file instanceof File) {
93
+            $output->writeln("<error>Can't generate previews for folders</error>");
94
+            return 1;
95
+        }
96 96
 
97
-		if (!$this->previewManager->isAvailable($file)) {
98
-			$output->writeln("<error>No preview generator available for file of type" . $file->getMimetype() . "</error>");
99
-			return 1;
100
-		}
97
+        if (!$this->previewManager->isAvailable($file)) {
98
+            $output->writeln("<error>No preview generator available for file of type" . $file->getMimetype() . "</error>");
99
+            return 1;
100
+        }
101 101
 
102
-		$specifications = array_map(function (array $sizes) use ($crop, $mode) {
103
-			return [
104
-				'width' => $sizes[0],
105
-				'height' => $sizes[1],
106
-				'crop' => $crop,
107
-				'mode' => $mode,
108
-			];
109
-		}, $sizes);
102
+        $specifications = array_map(function (array $sizes) use ($crop, $mode) {
103
+            return [
104
+                'width' => $sizes[0],
105
+                'height' => $sizes[1],
106
+                'crop' => $crop,
107
+                'mode' => $mode,
108
+            ];
109
+        }, $sizes);
110 110
 
111
-		$this->previewManager->generatePreviews($file, $specifications);
112
-		if (count($specifications) > 1) {
113
-			$output->writeln("generated <info>" . count($specifications) . "</info> previews");
114
-		} else {
115
-			$output->writeln("preview generated");
116
-		}
117
-		return 0;
118
-	}
111
+        $this->previewManager->generatePreviews($file, $specifications);
112
+        if (count($specifications) > 1) {
113
+            $output->writeln("generated <info>" . count($specifications) . "</info> previews");
114
+        } else {
115
+            $output->writeln("preview generated");
116
+        }
117
+        return 0;
118
+    }
119 119
 
120
-	private function getFile(string $fileInput): ?Node {
121
-		if (is_numeric($fileInput)) {
122
-			$mounts = $this->userMountCache->getMountsForFileId((int)$fileInput);
123
-			if (!$mounts) {
124
-				return null;
125
-			}
126
-			$mount = $mounts[0];
127
-			$userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID());
128
-			$nodes = $userFolder->getById((int)$fileInput);
129
-			if (!$nodes) {
130
-				return null;
131
-			}
132
-			return $nodes[0];
133
-		} else {
134
-			try {
135
-				return $this->rootFolder->get($fileInput);
136
-			} catch (NotFoundException $e) {
137
-				return null;
138
-			}
139
-		}
140
-	}
120
+    private function getFile(string $fileInput): ?Node {
121
+        if (is_numeric($fileInput)) {
122
+            $mounts = $this->userMountCache->getMountsForFileId((int)$fileInput);
123
+            if (!$mounts) {
124
+                return null;
125
+            }
126
+            $mount = $mounts[0];
127
+            $userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID());
128
+            $nodes = $userFolder->getById((int)$fileInput);
129
+            if (!$nodes) {
130
+                return null;
131
+            }
132
+            return $nodes[0];
133
+        } else {
134
+            try {
135
+                return $this->rootFolder->get($fileInput);
136
+            } catch (NotFoundException $e) {
137
+                return null;
138
+            }
139
+        }
140
+    }
141 141
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	protected function execute(InputInterface $input, OutputInterface $output): int {
62 62
 		$fileInput = $input->getArgument("file");
63 63
 		$sizes = $input->getOption("size");
64
-		$sizes = array_map(function (string $size) use ($output, &$error) {
64
+		$sizes = array_map(function(string $size) use ($output, &$error) {
65 65
 			if (str_contains($size, 'x')) {
66 66
 				$sizeParts = explode('x', $size, 2);
67 67
 			} else {
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
 		}
96 96
 
97 97
 		if (!$this->previewManager->isAvailable($file)) {
98
-			$output->writeln("<error>No preview generator available for file of type" . $file->getMimetype() . "</error>");
98
+			$output->writeln("<error>No preview generator available for file of type".$file->getMimetype()."</error>");
99 99
 			return 1;
100 100
 		}
101 101
 
102
-		$specifications = array_map(function (array $sizes) use ($crop, $mode) {
102
+		$specifications = array_map(function(array $sizes) use ($crop, $mode) {
103 103
 			return [
104 104
 				'width' => $sizes[0],
105 105
 				'height' => $sizes[1],
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 		$this->previewManager->generatePreviews($file, $specifications);
112 112
 		if (count($specifications) > 1) {
113
-			$output->writeln("generated <info>" . count($specifications) . "</info> previews");
113
+			$output->writeln("generated <info>".count($specifications)."</info> previews");
114 114
 		} else {
115 115
 			$output->writeln("preview generated");
116 116
 		}
@@ -119,13 +119,13 @@  discard block
 block discarded – undo
119 119
 
120 120
 	private function getFile(string $fileInput): ?Node {
121 121
 		if (is_numeric($fileInput)) {
122
-			$mounts = $this->userMountCache->getMountsForFileId((int)$fileInput);
122
+			$mounts = $this->userMountCache->getMountsForFileId((int) $fileInput);
123 123
 			if (!$mounts) {
124 124
 				return null;
125 125
 			}
126 126
 			$mount = $mounts[0];
127 127
 			$userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID());
128
-			$nodes = $userFolder->getById((int)$fileInput);
128
+			$nodes = $userFolder->getById((int) $fileInput);
129 129
 			if (!$nodes) {
130 130
 				return null;
131 131
 			}
Please login to merge, or discard this patch.