@@ -48,12 +48,12 @@ |
||
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 = []; |
@@ -42,7 +42,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |