Passed
Push — master ( 10388e...c84c13 )
by Joas
11:57 queued 10s
created
core/Command/App/Disable.php 2 patches
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -35,74 +35,74 @@
 block discarded – undo
35 35
 
36 36
 class Disable extends Command implements CompletionAwareInterface {
37 37
 
38
-	/** @var IAppManager */
39
-	protected $appManager;
38
+    /** @var IAppManager */
39
+    protected $appManager;
40 40
 
41
-	/** @var int */
42
-	protected $exitCode = 0;
41
+    /** @var int */
42
+    protected $exitCode = 0;
43 43
 
44
-	/**
45
-	 * @param IAppManager $appManager
46
-	 */
47
-	public function __construct(IAppManager $appManager) {
48
-		parent::__construct();
49
-		$this->appManager = $appManager;
50
-	}
44
+    /**
45
+     * @param IAppManager $appManager
46
+     */
47
+    public function __construct(IAppManager $appManager) {
48
+        parent::__construct();
49
+        $this->appManager = $appManager;
50
+    }
51 51
 
52
-	protected function configure(): void {
53
-		$this
54
-			->setName('app:disable')
55
-			->setDescription('disable an app')
56
-			->addArgument(
57
-				'app-id',
58
-				InputArgument::REQUIRED | InputArgument::IS_ARRAY,
59
-				'disable the specified app'
60
-			);
61
-	}
52
+    protected function configure(): void {
53
+        $this
54
+            ->setName('app:disable')
55
+            ->setDescription('disable an app')
56
+            ->addArgument(
57
+                'app-id',
58
+                InputArgument::REQUIRED | InputArgument::IS_ARRAY,
59
+                'disable the specified app'
60
+            );
61
+    }
62 62
 
63
-	protected function execute(InputInterface $input, OutputInterface $output) {
64
-		$appIds = $input->getArgument('app-id');
63
+    protected function execute(InputInterface $input, OutputInterface $output) {
64
+        $appIds = $input->getArgument('app-id');
65 65
 
66
-		foreach ($appIds as $appId) {
67
-			$this->disableApp($appId, $output);
68
-		}
66
+        foreach ($appIds as $appId) {
67
+            $this->disableApp($appId, $output);
68
+        }
69 69
 
70
-		return $this->exitCode;
71
-	}
70
+        return $this->exitCode;
71
+    }
72 72
 
73
-	private function disableApp(string $appId, OutputInterface $output): void {
74
-		if ($this->appManager->isInstalled($appId) === false) {
75
-			$output->writeln('No such app enabled: ' . $appId);
76
-			return;
77
-		}
73
+    private function disableApp(string $appId, OutputInterface $output): void {
74
+        if ($this->appManager->isInstalled($appId) === false) {
75
+            $output->writeln('No such app enabled: ' . $appId);
76
+            return;
77
+        }
78 78
 
79
-		try {
80
-			$this->appManager->disableApp($appId);
81
-			$output->writeln($appId . ' disabled');
82
-		} catch (\Exception $e) {
83
-			$output->writeln($e->getMessage());
84
-			$this->exitCode = 2;
85
-		}
86
-	}
79
+        try {
80
+            $this->appManager->disableApp($appId);
81
+            $output->writeln($appId . ' disabled');
82
+        } catch (\Exception $e) {
83
+            $output->writeln($e->getMessage());
84
+            $this->exitCode = 2;
85
+        }
86
+    }
87 87
 
88
-	/**
89
-	 * @param string $optionName
90
-	 * @param CompletionContext $context
91
-	 * @return string[]
92
-	 */
93
-	public function completeOptionValues($optionName, CompletionContext $context) {
94
-		return [];
95
-	}
88
+    /**
89
+     * @param string $optionName
90
+     * @param CompletionContext $context
91
+     * @return string[]
92
+     */
93
+    public function completeOptionValues($optionName, CompletionContext $context) {
94
+        return [];
95
+    }
96 96
 
97
-	/**
98
-	 * @param string $argumentName
99
-	 * @param CompletionContext $context
100
-	 * @return string[]
101
-	 */
102
-	public function completeArgumentValues($argumentName, CompletionContext $context) {
103
-		if ($argumentName === 'app-id') {
104
-			return array_diff(\OC_App::getEnabledApps(true, true), $this->appManager->getAlwaysEnabledApps());
105
-		}
106
-		return [];
107
-	}
97
+    /**
98
+     * @param string $argumentName
99
+     * @param CompletionContext $context
100
+     * @return string[]
101
+     */
102
+    public function completeArgumentValues($argumentName, CompletionContext $context) {
103
+        if ($argumentName === 'app-id') {
104
+            return array_diff(\OC_App::getEnabledApps(true, true), $this->appManager->getAlwaysEnabledApps());
105
+        }
106
+        return [];
107
+    }
108 108
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,13 +72,13 @@
 block discarded – undo
72 72
 
73 73
 	private function disableApp(string $appId, OutputInterface $output): void {
74 74
 		if ($this->appManager->isInstalled($appId) === false) {
75
-			$output->writeln('No such app enabled: ' . $appId);
75
+			$output->writeln('No such app enabled: '.$appId);
76 76
 			return;
77 77
 		}
78 78
 
79 79
 		try {
80 80
 			$this->appManager->disableApp($appId);
81
-			$output->writeln($appId . ' disabled');
81
+			$output->writeln($appId.' disabled');
82 82
 		} catch (\Exception $e) {
83 83
 			$output->writeln($e->getMessage());
84 84
 			$this->exitCode = 2;
Please login to merge, or discard this patch.
core/Command/App/Enable.php 2 patches
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -41,129 +41,129 @@
 block discarded – undo
41 41
 
42 42
 class Enable extends Command implements CompletionAwareInterface {
43 43
 
44
-	/** @var IAppManager */
45
-	protected $appManager;
46
-
47
-	/** @var IGroupManager */
48
-	protected $groupManager;
49
-
50
-	/** @var int */
51
-	protected $exitCode = 0;
52
-
53
-	/**
54
-	 * @param IAppManager $appManager
55
-	 * @param IGroupManager $groupManager
56
-	 */
57
-	public function __construct(IAppManager $appManager, IGroupManager $groupManager) {
58
-		parent::__construct();
59
-		$this->appManager = $appManager;
60
-		$this->groupManager = $groupManager;
61
-	}
62
-
63
-	protected function configure(): void {
64
-		$this
65
-			->setName('app:enable')
66
-			->setDescription('enable an app')
67
-			->addArgument(
68
-				'app-id',
69
-				InputArgument::REQUIRED | InputArgument::IS_ARRAY,
70
-				'enable the specified app'
71
-			)
72
-			->addOption(
73
-				'groups',
74
-				'g',
75
-				InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
76
-				'enable the app only for a list of groups'
77
-			);
78
-	}
79
-
80
-	protected function execute(InputInterface $input, OutputInterface $output) {
81
-		$appIds = $input->getArgument('app-id');
82
-		$groups = $this->resolveGroupIds($input->getOption('groups'));
83
-
84
-		foreach ($appIds as $appId) {
85
-			$this->enableApp($appId, $groups, $output);
86
-		}
87
-
88
-		return $this->exitCode;
89
-	}
90
-
91
-	/**
92
-	 * @param string $appId
93
-	 * @param array $groupIds
94
-	 * @param OutputInterface $output
95
-	 */
96
-	private function enableApp(string $appId, array $groupIds, OutputInterface $output): void {
97
-		$groupNames = array_map(function (IGroup $group) {
98
-			return $group->getDisplayName();
99
-		}, $groupIds);
100
-
101
-
102
-		try {
103
-			/** @var Installer $installer */
104
-			$installer = \OC::$server->query(Installer::class);
105
-
106
-			if (false === $installer->isDownloaded($appId)) {
107
-				$installer->downloadApp($appId);
108
-			}
109
-
110
-			$installer->installApp($appId);
111
-
112
-			if ($groupIds === []) {
113
-				$this->appManager->enableApp($appId);
114
-				$output->writeln($appId . ' enabled');
115
-			} else {
116
-				$this->appManager->enableAppForGroups($appId, $groupIds);
117
-				$output->writeln($appId . ' enabled for groups: ' . implode(', ', $groupNames));
118
-			}
119
-		} catch (AppPathNotFoundException $e) {
120
-			$output->writeln($appId . ' not found');
121
-			$this->exitCode = 1;
122
-		} catch (\Exception $e) {
123
-			$output->writeln($e->getMessage());
124
-			$this->exitCode = 1;
125
-		}
126
-	}
127
-
128
-	/**
129
-	 * @param array $groupIds
130
-	 * @return array
131
-	 */
132
-	private function resolveGroupIds(array $groupIds): array {
133
-		$groups = [];
134
-		foreach ($groupIds as $groupId) {
135
-			$group = $this->groupManager->get($groupId);
136
-			if ($group instanceof IGroup) {
137
-				$groups[] = $group;
138
-			}
139
-		}
140
-		return $groups;
141
-	}
142
-
143
-	/**
144
-	 * @param string $optionName
145
-	 * @param CompletionContext $context
146
-	 * @return string[]
147
-	 */
148
-	public function completeOptionValues($optionName, CompletionContext $context) {
149
-		if ($optionName === 'groups') {
150
-			return array_map(function (IGroup $group) {
151
-				return $group->getGID();
152
-			}, $this->groupManager->search($context->getCurrentWord()));
153
-		}
154
-		return [];
155
-	}
156
-
157
-	/**
158
-	 * @param string $argumentName
159
-	 * @param CompletionContext $context
160
-	 * @return string[]
161
-	 */
162
-	public function completeArgumentValues($argumentName, CompletionContext $context) {
163
-		if ($argumentName === 'app-id') {
164
-			$allApps = \OC_App::getAllApps();
165
-			return array_diff($allApps, \OC_App::getEnabledApps(true, true));
166
-		}
167
-		return [];
168
-	}
44
+    /** @var IAppManager */
45
+    protected $appManager;
46
+
47
+    /** @var IGroupManager */
48
+    protected $groupManager;
49
+
50
+    /** @var int */
51
+    protected $exitCode = 0;
52
+
53
+    /**
54
+     * @param IAppManager $appManager
55
+     * @param IGroupManager $groupManager
56
+     */
57
+    public function __construct(IAppManager $appManager, IGroupManager $groupManager) {
58
+        parent::__construct();
59
+        $this->appManager = $appManager;
60
+        $this->groupManager = $groupManager;
61
+    }
62
+
63
+    protected function configure(): void {
64
+        $this
65
+            ->setName('app:enable')
66
+            ->setDescription('enable an app')
67
+            ->addArgument(
68
+                'app-id',
69
+                InputArgument::REQUIRED | InputArgument::IS_ARRAY,
70
+                'enable the specified app'
71
+            )
72
+            ->addOption(
73
+                'groups',
74
+                'g',
75
+                InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
76
+                'enable the app only for a list of groups'
77
+            );
78
+    }
79
+
80
+    protected function execute(InputInterface $input, OutputInterface $output) {
81
+        $appIds = $input->getArgument('app-id');
82
+        $groups = $this->resolveGroupIds($input->getOption('groups'));
83
+
84
+        foreach ($appIds as $appId) {
85
+            $this->enableApp($appId, $groups, $output);
86
+        }
87
+
88
+        return $this->exitCode;
89
+    }
90
+
91
+    /**
92
+     * @param string $appId
93
+     * @param array $groupIds
94
+     * @param OutputInterface $output
95
+     */
96
+    private function enableApp(string $appId, array $groupIds, OutputInterface $output): void {
97
+        $groupNames = array_map(function (IGroup $group) {
98
+            return $group->getDisplayName();
99
+        }, $groupIds);
100
+
101
+
102
+        try {
103
+            /** @var Installer $installer */
104
+            $installer = \OC::$server->query(Installer::class);
105
+
106
+            if (false === $installer->isDownloaded($appId)) {
107
+                $installer->downloadApp($appId);
108
+            }
109
+
110
+            $installer->installApp($appId);
111
+
112
+            if ($groupIds === []) {
113
+                $this->appManager->enableApp($appId);
114
+                $output->writeln($appId . ' enabled');
115
+            } else {
116
+                $this->appManager->enableAppForGroups($appId, $groupIds);
117
+                $output->writeln($appId . ' enabled for groups: ' . implode(', ', $groupNames));
118
+            }
119
+        } catch (AppPathNotFoundException $e) {
120
+            $output->writeln($appId . ' not found');
121
+            $this->exitCode = 1;
122
+        } catch (\Exception $e) {
123
+            $output->writeln($e->getMessage());
124
+            $this->exitCode = 1;
125
+        }
126
+    }
127
+
128
+    /**
129
+     * @param array $groupIds
130
+     * @return array
131
+     */
132
+    private function resolveGroupIds(array $groupIds): array {
133
+        $groups = [];
134
+        foreach ($groupIds as $groupId) {
135
+            $group = $this->groupManager->get($groupId);
136
+            if ($group instanceof IGroup) {
137
+                $groups[] = $group;
138
+            }
139
+        }
140
+        return $groups;
141
+    }
142
+
143
+    /**
144
+     * @param string $optionName
145
+     * @param CompletionContext $context
146
+     * @return string[]
147
+     */
148
+    public function completeOptionValues($optionName, CompletionContext $context) {
149
+        if ($optionName === 'groups') {
150
+            return array_map(function (IGroup $group) {
151
+                return $group->getGID();
152
+            }, $this->groupManager->search($context->getCurrentWord()));
153
+        }
154
+        return [];
155
+    }
156
+
157
+    /**
158
+     * @param string $argumentName
159
+     * @param CompletionContext $context
160
+     * @return string[]
161
+     */
162
+    public function completeArgumentValues($argumentName, CompletionContext $context) {
163
+        if ($argumentName === 'app-id') {
164
+            $allApps = \OC_App::getAllApps();
165
+            return array_diff($allApps, \OC_App::getEnabledApps(true, true));
166
+        }
167
+        return [];
168
+    }
169 169
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 * @param OutputInterface $output
95 95
 	 */
96 96
 	private function enableApp(string $appId, array $groupIds, OutputInterface $output): void {
97
-		$groupNames = array_map(function (IGroup $group) {
97
+		$groupNames = array_map(function(IGroup $group) {
98 98
 			return $group->getDisplayName();
99 99
 		}, $groupIds);
100 100
 
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 
112 112
 			if ($groupIds === []) {
113 113
 				$this->appManager->enableApp($appId);
114
-				$output->writeln($appId . ' enabled');
114
+				$output->writeln($appId.' enabled');
115 115
 			} else {
116 116
 				$this->appManager->enableAppForGroups($appId, $groupIds);
117
-				$output->writeln($appId . ' enabled for groups: ' . implode(', ', $groupNames));
117
+				$output->writeln($appId.' enabled for groups: '.implode(', ', $groupNames));
118 118
 			}
119 119
 		} catch (AppPathNotFoundException $e) {
120
-			$output->writeln($appId . ' not found');
120
+			$output->writeln($appId.' not found');
121 121
 			$this->exitCode = 1;
122 122
 		} catch (\Exception $e) {
123 123
 			$output->writeln($e->getMessage());
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	public function completeOptionValues($optionName, CompletionContext $context) {
149 149
 		if ($optionName === 'groups') {
150
-			return array_map(function (IGroup $group) {
150
+			return array_map(function(IGroup $group) {
151 151
 				return $group->getGID();
152 152
 			}, $this->groupManager->search($context->getCurrentWord()));
153 153
 		}
Please login to merge, or discard this patch.
core/register_command.php 1 patch
Indentation   +102 added lines, -102 removed lines patch added patch discarded remove patch
@@ -43,129 +43,129 @@
 block discarded – undo
43 43
 $application->add(new OC\Core\Command\App\CheckCode());
44 44
 $application->add(new OC\Core\Command\L10n\CreateJs());
45 45
 $application->add(new \OC\Core\Command\Integrity\SignApp(
46
-		\OC::$server->getIntegrityCodeChecker(),
47
-		new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
48
-		\OC::$server->getURLGenerator()
46
+        \OC::$server->getIntegrityCodeChecker(),
47
+        new \OC\IntegrityCheck\Helpers\FileAccessHelper(),
48
+        \OC::$server->getURLGenerator()
49 49
 ));
50 50
 $application->add(new \OC\Core\Command\Integrity\SignCore(
51
-		\OC::$server->getIntegrityCodeChecker(),
52
-		new \OC\IntegrityCheck\Helpers\FileAccessHelper()
51
+        \OC::$server->getIntegrityCodeChecker(),
52
+        new \OC\IntegrityCheck\Helpers\FileAccessHelper()
53 53
 ));
54 54
 $application->add(new \OC\Core\Command\Integrity\CheckApp(
55
-		\OC::$server->getIntegrityCodeChecker()
55
+        \OC::$server->getIntegrityCodeChecker()
56 56
 ));
57 57
 $application->add(new \OC\Core\Command\Integrity\CheckCore(
58
-		\OC::$server->getIntegrityCodeChecker()
58
+        \OC::$server->getIntegrityCodeChecker()
59 59
 ));
60 60
 
61 61
 
62 62
 if (\OC::$server->getConfig()->getSystemValue('installed', false)) {
63
-	$application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager()));
64
-	$application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager()));
65
-	$application->add(new OC\Core\Command\App\Install());
66
-	$application->add(new OC\Core\Command\App\GetPath());
67
-	$application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
68
-	$application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger()));
69
-	$application->add(\OC::$server->query(\OC\Core\Command\App\Update::class));
63
+    $application->add(new OC\Core\Command\App\Disable(\OC::$server->getAppManager()));
64
+    $application->add(new OC\Core\Command\App\Enable(\OC::$server->getAppManager(), \OC::$server->getGroupManager()));
65
+    $application->add(new OC\Core\Command\App\Install());
66
+    $application->add(new OC\Core\Command\App\GetPath());
67
+    $application->add(new OC\Core\Command\App\ListApps(\OC::$server->getAppManager()));
68
+    $application->add(new OC\Core\Command\App\Remove(\OC::$server->getAppManager(), \OC::$server->query(\OC\Installer::class), \OC::$server->getLogger()));
69
+    $application->add(\OC::$server->query(\OC\Core\Command\App\Update::class));
70 70
 
71
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class));
72
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class));
73
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class));
74
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class));
75
-	$application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class));
71
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Cleanup::class));
72
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enforce::class));
73
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Enable::class));
74
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\Disable::class));
75
+    $application->add(\OC::$server->query(\OC\Core\Command\TwoFactorAuth\State::class));
76 76
 
77
-	$application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));
78
-	$application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig()));
79
-	$application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig()));
77
+    $application->add(new OC\Core\Command\Background\Cron(\OC::$server->getConfig()));
78
+    $application->add(new OC\Core\Command\Background\WebCron(\OC::$server->getConfig()));
79
+    $application->add(new OC\Core\Command\Background\Ajax(\OC::$server->getConfig()));
80 80
 
81
-	$application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig()));
82
-	$application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig()));
83
-	$application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig()));
84
-	$application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig()));
85
-	$application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig()));
86
-	$application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig()));
87
-	$application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig()));
88
-	$application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig()));
81
+    $application->add(new OC\Core\Command\Config\App\DeleteConfig(\OC::$server->getConfig()));
82
+    $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig()));
83
+    $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig()));
84
+    $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig()));
85
+    $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig()));
86
+    $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig()));
87
+    $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig()));
88
+    $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig()));
89 89
 
90
-	$application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig())));
91
-	$application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger()));
92
-	$application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection()));
93
-	$application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher()));
94
-	$application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection()));
95
-	$application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection()));
96
-	$application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager()));
97
-	$application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection()));
98
-	$application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig()));
90
+    $application->add(new OC\Core\Command\Db\ConvertType(\OC::$server->getConfig(), new \OC\DB\ConnectionFactory(\OC::$server->getSystemConfig())));
91
+    $application->add(new OC\Core\Command\Db\ConvertMysqlToMB4(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection(), \OC::$server->getURLGenerator(), \OC::$server->getLogger()));
92
+    $application->add(new OC\Core\Command\Db\ConvertFilecacheBigInt(\OC::$server->getDatabaseConnection()));
93
+    $application->add(new OC\Core\Command\Db\AddMissingIndices(\OC::$server->getDatabaseConnection(), \OC::$server->getEventDispatcher()));
94
+    $application->add(new OC\Core\Command\Db\Migrations\StatusCommand(\OC::$server->getDatabaseConnection()));
95
+    $application->add(new OC\Core\Command\Db\Migrations\MigrateCommand(\OC::$server->getDatabaseConnection()));
96
+    $application->add(new OC\Core\Command\Db\Migrations\GenerateCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager()));
97
+    $application->add(new OC\Core\Command\Db\Migrations\GenerateFromSchemaFileCommand(\OC::$server->getConfig(), \OC::$server->getAppManager(), \OC::$server->getDatabaseConnection()));
98
+    $application->add(new OC\Core\Command\Db\Migrations\ExecuteCommand(\OC::$server->getDatabaseConnection(), \OC::$server->getAppManager(), \OC::$server->getConfig()));
99 99
 
100
-	$application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig()));
101
-	$application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager()));
102
-	$application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager()));
103
-	$application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager()));
104
-	$application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager()));
105
-	$application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper()));
106
-	$application->add(new OC\Core\Command\Encryption\DecryptAll(
107
-		\OC::$server->getEncryptionManager(),
108
-		\OC::$server->getAppManager(),
109
-		\OC::$server->getConfig(),
110
-		new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()),
111
-		new \Symfony\Component\Console\Helper\QuestionHelper())
112
-	);
100
+    $application->add(new OC\Core\Command\Encryption\Disable(\OC::$server->getConfig()));
101
+    $application->add(new OC\Core\Command\Encryption\Enable(\OC::$server->getConfig(), \OC::$server->getEncryptionManager()));
102
+    $application->add(new OC\Core\Command\Encryption\ListModules(\OC::$server->getEncryptionManager()));
103
+    $application->add(new OC\Core\Command\Encryption\SetDefaultModule(\OC::$server->getEncryptionManager()));
104
+    $application->add(new OC\Core\Command\Encryption\Status(\OC::$server->getEncryptionManager()));
105
+    $application->add(new OC\Core\Command\Encryption\EncryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getAppManager(), \OC::$server->getConfig(), new \Symfony\Component\Console\Helper\QuestionHelper()));
106
+    $application->add(new OC\Core\Command\Encryption\DecryptAll(
107
+        \OC::$server->getEncryptionManager(),
108
+        \OC::$server->getAppManager(),
109
+        \OC::$server->getConfig(),
110
+        new \OC\Encryption\DecryptAll(\OC::$server->getEncryptionManager(), \OC::$server->getUserManager(), new \OC\Files\View()),
111
+        new \Symfony\Component\Console\Helper\QuestionHelper())
112
+    );
113 113
 
114
-	$application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig()));
115
-	$application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig()));
114
+    $application->add(new OC\Core\Command\Log\Manage(\OC::$server->getConfig()));
115
+    $application->add(new OC\Core\Command\Log\File(\OC::$server->getConfig()));
116 116
 
117
-	$view = new \OC\Files\View();
118
-	$util = new \OC\Encryption\Util(
119
-		$view,
120
-		\OC::$server->getUserManager(),
121
-		\OC::$server->getGroupManager(),
122
-		\OC::$server->getConfig()
123
-	);
124
-	$application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot(
125
-			$view,
126
-			\OC::$server->getUserManager(),
127
-			\OC::$server->getConfig(),
128
-			$util,
129
-			new \Symfony\Component\Console\Helper\QuestionHelper()
130
-		)
131
-	);
132
-	$application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util));
117
+    $view = new \OC\Files\View();
118
+    $util = new \OC\Encryption\Util(
119
+        $view,
120
+        \OC::$server->getUserManager(),
121
+        \OC::$server->getGroupManager(),
122
+        \OC::$server->getConfig()
123
+    );
124
+    $application->add(new OC\Core\Command\Encryption\ChangeKeyStorageRoot(
125
+            $view,
126
+            \OC::$server->getUserManager(),
127
+            \OC::$server->getConfig(),
128
+            $util,
129
+            new \Symfony\Component\Console\Helper\QuestionHelper()
130
+        )
131
+    );
132
+    $application->add(new OC\Core\Command\Encryption\ShowKeyStorageRoot($util));
133 133
 
134
-	$application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory()));
135
-	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader()));
136
-	$application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector()));
137
-	$application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
138
-	$application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
139
-	$application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
134
+    $application->add(new OC\Core\Command\Maintenance\DataFingerprint(\OC::$server->getConfig(), new \OC\AppFramework\Utility\TimeFactory()));
135
+    $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateDB(\OC::$server->getMimeTypeDetector(), \OC::$server->getMimeTypeLoader()));
136
+    $application->add(new OC\Core\Command\Maintenance\Mimetype\UpdateJS(\OC::$server->getMimeTypeDetector()));
137
+    $application->add(new OC\Core\Command\Maintenance\Mode(\OC::$server->getConfig()));
138
+    $application->add(new OC\Core\Command\Maintenance\UpdateHtaccess());
139
+    $application->add(new OC\Core\Command\Maintenance\UpdateTheme(\OC::$server->getMimeTypeDetector(), \OC::$server->getMemCacheFactory()));
140 140
 
141
-	$application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class)));
142
-	$application->add(new OC\Core\Command\Maintenance\Repair(
143
-		new \OC\Repair([], \OC::$server->getEventDispatcher()),
144
-		\OC::$server->getConfig(),
145
-		\OC::$server->getEventDispatcher(),
146
-		\OC::$server->getAppManager()
147
-	));
141
+    $application->add(new OC\Core\Command\Upgrade(\OC::$server->getConfig(), \OC::$server->getLogger(), \OC::$server->query(\OC\Installer::class)));
142
+    $application->add(new OC\Core\Command\Maintenance\Repair(
143
+        new \OC\Repair([], \OC::$server->getEventDispatcher()),
144
+        \OC::$server->getConfig(),
145
+        \OC::$server->getEventDispatcher(),
146
+        \OC::$server->getAppManager()
147
+    ));
148 148
 
149
-	$application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
150
-	$application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
151
-	$application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager()));
152
-	$application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager()));
153
-	$application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager()));
154
-	$application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager()));
155
-	$application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
156
-	$application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection()));
157
-	$application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager()));
158
-	$application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
149
+    $application->add(new OC\Core\Command\User\Add(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
150
+    $application->add(new OC\Core\Command\User\Delete(\OC::$server->getUserManager()));
151
+    $application->add(new OC\Core\Command\User\Disable(\OC::$server->getUserManager()));
152
+    $application->add(new OC\Core\Command\User\Enable(\OC::$server->getUserManager()));
153
+    $application->add(new OC\Core\Command\User\LastSeen(\OC::$server->getUserManager()));
154
+    $application->add(new OC\Core\Command\User\Report(\OC::$server->getUserManager()));
155
+    $application->add(new OC\Core\Command\User\ResetPassword(\OC::$server->getUserManager()));
156
+    $application->add(new OC\Core\Command\User\Setting(\OC::$server->getUserManager(), \OC::$server->getConfig(), \OC::$server->getDatabaseConnection()));
157
+    $application->add(new OC\Core\Command\User\ListCommand(\OC::$server->getUserManager()));
158
+    $application->add(new OC\Core\Command\User\Info(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
159 159
 
160
-	$application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager()));
161
-	$application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager()));
162
-	$application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager()));
163
-	$application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
164
-	$application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
160
+    $application->add(new OC\Core\Command\Group\Add(\OC::$server->getGroupManager()));
161
+    $application->add(new OC\Core\Command\Group\Delete(\OC::$server->getGroupManager()));
162
+    $application->add(new OC\Core\Command\Group\ListCommand(\OC::$server->getGroupManager()));
163
+    $application->add(new OC\Core\Command\Group\AddUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
164
+    $application->add(new OC\Core\Command\Group\RemoveUser(\OC::$server->getUserManager(), \OC::$server->getGroupManager()));
165 165
 
166
-	$application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core')));
167
-	$application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null)));
168
-	$application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null)));
166
+    $application->add(new OC\Core\Command\Security\ListCertificates(\OC::$server->getCertificateManager(null), \OC::$server->getL10N('core')));
167
+    $application->add(new OC\Core\Command\Security\ImportCertificate(\OC::$server->getCertificateManager(null)));
168
+    $application->add(new OC\Core\Command\Security\RemoveCertificate(\OC::$server->getCertificateManager(null)));
169 169
 } else {
170
-	$application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig()));
170
+    $application->add(new OC\Core\Command\Maintenance\Install(\OC::$server->getSystemConfig()));
171 171
 }
Please login to merge, or discard this patch.