@@ -34,41 +34,41 @@ |
||
| 34 | 34 | use Symfony\Component\Console\Output\OutputInterface; |
| 35 | 35 | |
| 36 | 36 | class CheckCode extends Command { |
| 37 | - protected $checkers = []; |
|
| 37 | + protected $checkers = []; |
|
| 38 | 38 | |
| 39 | - protected function configure() { |
|
| 40 | - $this |
|
| 41 | - ->setName('app:check-code') |
|
| 42 | - ->setDescription('check code to be compliant') |
|
| 43 | - ->addArgument( |
|
| 44 | - 'app-id', |
|
| 45 | - InputArgument::REQUIRED, |
|
| 46 | - 'check the specified app' |
|
| 47 | - ) |
|
| 48 | - ->addOption( |
|
| 49 | - 'checker', |
|
| 50 | - 'c', |
|
| 51 | - InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, |
|
| 52 | - 'enable the specified checker(s)', |
|
| 53 | - [ 'private', 'deprecation', 'strong-comparison' ] |
|
| 54 | - ) |
|
| 55 | - ->addOption( |
|
| 56 | - '--skip-checkers', |
|
| 57 | - null, |
|
| 58 | - InputOption::VALUE_NONE, |
|
| 59 | - 'skips the the code checkers to only check info.xml, language and database schema' |
|
| 60 | - ) |
|
| 61 | - ->addOption( |
|
| 62 | - '--skip-validate-info', |
|
| 63 | - null, |
|
| 64 | - InputOption::VALUE_NONE, |
|
| 65 | - 'skips the info.xml/version check' |
|
| 66 | - ); |
|
| 67 | - } |
|
| 39 | + protected function configure() { |
|
| 40 | + $this |
|
| 41 | + ->setName('app:check-code') |
|
| 42 | + ->setDescription('check code to be compliant') |
|
| 43 | + ->addArgument( |
|
| 44 | + 'app-id', |
|
| 45 | + InputArgument::REQUIRED, |
|
| 46 | + 'check the specified app' |
|
| 47 | + ) |
|
| 48 | + ->addOption( |
|
| 49 | + 'checker', |
|
| 50 | + 'c', |
|
| 51 | + InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, |
|
| 52 | + 'enable the specified checker(s)', |
|
| 53 | + [ 'private', 'deprecation', 'strong-comparison' ] |
|
| 54 | + ) |
|
| 55 | + ->addOption( |
|
| 56 | + '--skip-checkers', |
|
| 57 | + null, |
|
| 58 | + InputOption::VALUE_NONE, |
|
| 59 | + 'skips the the code checkers to only check info.xml, language and database schema' |
|
| 60 | + ) |
|
| 61 | + ->addOption( |
|
| 62 | + '--skip-validate-info', |
|
| 63 | + null, |
|
| 64 | + InputOption::VALUE_NONE, |
|
| 65 | + 'skips the info.xml/version check' |
|
| 66 | + ); |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - protected function execute(InputInterface $input, OutputInterface $output): int { |
|
| 70 | - $output->writeln('<error>The app code checker doesn\t check anything and this command will be removed in Nextcloud 23</error>'); |
|
| 69 | + protected function execute(InputInterface $input, OutputInterface $output): int { |
|
| 70 | + $output->writeln('<error>The app code checker doesn\t check anything and this command will be removed in Nextcloud 23</error>'); |
|
| 71 | 71 | |
| 72 | - return 0; |
|
| 73 | - } |
|
| 72 | + return 0; |
|
| 73 | + } |
|
| 74 | 74 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | 'c', |
| 51 | 51 | InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, |
| 52 | 52 | 'enable the specified checker(s)', |
| 53 | - [ 'private', 'deprecation', 'strong-comparison' ] |
|
| 53 | + ['private', 'deprecation', 'strong-comparison'] |
|
| 54 | 54 | ) |
| 55 | 55 | ->addOption( |
| 56 | 56 | '--skip-checkers', |