Passed
Push — master ( c391e8...b9907d )
by John
15:18 queued 11s
created
core/Command/App/Install.php 2 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -35,63 +35,63 @@
 block discarded – undo
35 35
 use Symfony\Component\Console\Output\OutputInterface;
36 36
 
37 37
 class Install extends Command {
38
-	protected function configure() {
39
-		$this
40
-			->setName('app:install')
41
-			->setDescription('install an app')
42
-			->addArgument(
43
-				'app-id',
44
-				InputArgument::REQUIRED,
45
-				'install the specified app'
46
-			)
47
-			->addOption(
48
-				'keep-disabled',
49
-				null,
50
-				InputOption::VALUE_NONE,
51
-				'don\'t enable the app afterwards'
52
-			)
53
-			->addOption(
54
-				'force',
55
-				'f',
56
-				InputOption::VALUE_NONE,
57
-				'install the app regardless of the Nextcloud version requirement'
58
-			)
59
-		;
60
-	}
38
+    protected function configure() {
39
+        $this
40
+            ->setName('app:install')
41
+            ->setDescription('install an app')
42
+            ->addArgument(
43
+                'app-id',
44
+                InputArgument::REQUIRED,
45
+                'install the specified app'
46
+            )
47
+            ->addOption(
48
+                'keep-disabled',
49
+                null,
50
+                InputOption::VALUE_NONE,
51
+                'don\'t enable the app afterwards'
52
+            )
53
+            ->addOption(
54
+                'force',
55
+                'f',
56
+                InputOption::VALUE_NONE,
57
+                'install the app regardless of the Nextcloud version requirement'
58
+            )
59
+        ;
60
+    }
61 61
 
62
-	protected function execute(InputInterface $input, OutputInterface $output): int {
63
-		$appId = $input->getArgument('app-id');
64
-		$forceEnable = (bool) $input->getOption('force');
62
+    protected function execute(InputInterface $input, OutputInterface $output): int {
63
+        $appId = $input->getArgument('app-id');
64
+        $forceEnable = (bool) $input->getOption('force');
65 65
 
66
-		if (\OC_App::getAppPath($appId)) {
67
-			$output->writeln($appId . ' already installed');
68
-			return 1;
69
-		}
66
+        if (\OC_App::getAppPath($appId)) {
67
+            $output->writeln($appId . ' already installed');
68
+            return 1;
69
+        }
70 70
 
71
-		try {
72
-			/** @var Installer $installer */
73
-			$installer = \OC::$server->query(Installer::class);
74
-			$installer->downloadApp($appId);
75
-			$result = $installer->installApp($appId, $forceEnable);
76
-		} catch (\Exception $e) {
77
-			$output->writeln('Error: ' . $e->getMessage());
78
-			return 1;
79
-		}
71
+        try {
72
+            /** @var Installer $installer */
73
+            $installer = \OC::$server->query(Installer::class);
74
+            $installer->downloadApp($appId);
75
+            $result = $installer->installApp($appId, $forceEnable);
76
+        } catch (\Exception $e) {
77
+            $output->writeln('Error: ' . $e->getMessage());
78
+            return 1;
79
+        }
80 80
 
81
-		if ($result === false) {
82
-			$output->writeln($appId . ' couldn\'t be installed');
83
-			return 1;
84
-		}
81
+        if ($result === false) {
82
+            $output->writeln($appId . ' couldn\'t be installed');
83
+            return 1;
84
+        }
85 85
 
86
-		$appVersion = \OC_App::getAppVersion($appId);
87
-		$output->writeln($appId . ' ' . $appVersion . ' installed');
86
+        $appVersion = \OC_App::getAppVersion($appId);
87
+        $output->writeln($appId . ' ' . $appVersion . ' installed');
88 88
 
89
-		if (!$input->getOption('keep-disabled')) {
90
-			$appClass = new \OC_App();
91
-			$appClass->enable($appId);
92
-			$output->writeln($appId . ' enabled');
93
-		}
89
+        if (!$input->getOption('keep-disabled')) {
90
+            $appClass = new \OC_App();
91
+            $appClass->enable($appId);
92
+            $output->writeln($appId . ' enabled');
93
+        }
94 94
 
95
-		return 0;
96
-	}
95
+        return 0;
96
+    }
97 97
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		$forceEnable = (bool) $input->getOption('force');
65 65
 
66 66
 		if (\OC_App::getAppPath($appId)) {
67
-			$output->writeln($appId . ' already installed');
67
+			$output->writeln($appId.' already installed');
68 68
 			return 1;
69 69
 		}
70 70
 
@@ -74,22 +74,22 @@  discard block
 block discarded – undo
74 74
 			$installer->downloadApp($appId);
75 75
 			$result = $installer->installApp($appId, $forceEnable);
76 76
 		} catch (\Exception $e) {
77
-			$output->writeln('Error: ' . $e->getMessage());
77
+			$output->writeln('Error: '.$e->getMessage());
78 78
 			return 1;
79 79
 		}
80 80
 
81 81
 		if ($result === false) {
82
-			$output->writeln($appId . ' couldn\'t be installed');
82
+			$output->writeln($appId.' couldn\'t be installed');
83 83
 			return 1;
84 84
 		}
85 85
 
86 86
 		$appVersion = \OC_App::getAppVersion($appId);
87
-		$output->writeln($appId . ' ' . $appVersion . ' installed');
87
+		$output->writeln($appId.' '.$appVersion.' installed');
88 88
 
89 89
 		if (!$input->getOption('keep-disabled')) {
90 90
 			$appClass = new \OC_App();
91 91
 			$appClass->enable($appId);
92
-			$output->writeln($appId . ' enabled');
92
+			$output->writeln($appId.' enabled');
93 93
 		}
94 94
 
95 95
 		return 0;
Please login to merge, or discard this patch.