Completed
Pull Request — master (#8232)
by Joas
25:31 queued 09:08
created
lib/private/App/CodeChecker/InfoChecker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,12 +48,12 @@
 block discarded – undo
48 48
 		}
49 49
 
50 50
 		$xml = new \DOMDocument();
51
-		$xml->load($appPath . '/appinfo/info.xml');
51
+		$xml->load($appPath.'/appinfo/info.xml');
52 52
 
53
-		$schema = \OC::$SERVERROOT . '/resources/app-info.xsd';
53
+		$schema = \OC::$SERVERROOT.'/resources/app-info.xsd';
54 54
 		if ($this->appManager->isShipped($appId)) {
55 55
 			// Shipped apps are allowed to have the public and default_enabled tags
56
-			$schema = \OC::$SERVERROOT . '/resources/app-info-shipped.xsd';
56
+			$schema = \OC::$SERVERROOT.'/resources/app-info-shipped.xsd';
57 57
 		}
58 58
 
59 59
 		$errors = [];
Please login to merge, or discard this patch.
core/Command/App/CheckCode.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 use OC\App\CodeChecker\DeprecationCheck;
43 43
 use OC\App\CodeChecker\PrivateCheck;
44 44
 
45
-class CheckCode extends Command implements CompletionAwareInterface  {
45
+class CheckCode extends Command implements CompletionAwareInterface {
46 46
 
47 47
 	protected $checkers = [
48 48
 		'private' => PrivateCheck::class,
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 				'c',
65 65
 				InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
66 66
 				'enable the specified checker(s)',
67
-				[ 'private', 'deprecation', 'strong-comparison' ]
67
+				['private', 'deprecation', 'strong-comparison']
68 68
 			)
69 69
 			->addOption(
70 70
 				'--skip-checkers',
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 		$codeChecker = new CodeChecker($checkList, !$input->getOption('skip-validate-info'));
96 96
 
97 97
 		$codeChecker->listen('CodeChecker', 'analyseFileBegin', function($params) use ($output) {
98
-			if(OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
98
+			if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
99 99
 				$output->writeln("<info>Analysing {$params}</info>");
100 100
 			}
101 101
 		});
@@ -103,29 +103,29 @@  discard block
 block discarded – undo
103 103
 			$count = count($errors);
104 104
 
105 105
 			// show filename if the verbosity is low, but there are errors in a file
106
-			if($count > 0 && OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) {
106
+			if ($count > 0 && OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) {
107 107
 				$output->writeln("<info>Analysing {$filename}</info>");
108 108
 			}
109 109
 
110 110
 			// show error count if there are errors present or the verbosity is high
111
-			if($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
111
+			if ($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
112 112
 				$output->writeln(" {$count} errors");
113 113
 			}
114 114
 			usort($errors, function($a, $b) {
115
-				return $a['line'] >$b['line'];
115
+				return $a['line'] > $b['line'];
116 116
 			});
117 117
 
118
-			foreach($errors as $p) {
118
+			foreach ($errors as $p) {
119 119
 				$line = sprintf("%' 4d", $p['line']);
120 120
 				$output->writeln("    <error>line $line: {$p['disallowedToken']} - {$p['reason']}</error>");
121 121
 			}
122 122
 		});
123 123
 		$errors = [];
124
-		if(!$input->getOption('skip-checkers')) {
124
+		if (!$input->getOption('skip-checkers')) {
125 125
 			$errors = $codeChecker->analyse($appId);
126 126
 		}
127 127
 
128
-		if(!$input->getOption('skip-validate-info')) {
128
+		if (!$input->getOption('skip-validate-info')) {
129 129
 			// Can not inject because of circular dependency
130 130
 			$infoChecker = new InfoChecker(\OC::$server->getAppManager());
131 131
 			$infoChecker->listen('InfoChecker', 'parseError', function($error) use ($output) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 			throw new \RuntimeException("No app with given id <$appId> known.");
180 180
 		}
181 181
 
182
-		$updatePhp = $appPath . '/appinfo/update.php';
182
+		$updatePhp = $appPath.'/appinfo/update.php';
183 183
 		if (file_exists($updatePhp)) {
184 184
 			$output->writeln("<info>Deprecated file found: $updatePhp - please use repair steps</info>");
185 185
 		}
Please login to merge, or discard this patch.