diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-07 12:08:12 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-17 12:34:56 +0200 |
commit | bba87a2a3b46d20a552efa4a1d00d3253aedf27b (patch) | |
tree | b243d9e54018e114123b53021d0d93c327fbefcc /core | |
parent | 9e469046faee66171be15fa6d0bb6eef2289fa0f (diff) | |
download | nextcloud-server-bba87a2a3b46d20a552efa4a1d00d3253aedf27b.tar.gz nextcloud-server-bba87a2a3b46d20a552efa4a1d00d3253aedf27b.zip |
Restructor the code into different classes instead of extending
Diffstat (limited to 'core')
-rw-r--r-- | core/command/app/checkcode.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/command/app/checkcode.php b/core/command/app/checkcode.php index 5beb13e2c7c..a533ce767f3 100644 --- a/core/command/app/checkcode.php +++ b/core/command/app/checkcode.php @@ -23,8 +23,9 @@ namespace OC\Core\Command\App; -use OC\App\CodeChecker; -use OC\App\DeprecationCodeChecker; +use OC\App\CodeChecker\CodeChecker; +use OC\App\CodeChecker\DeprecationList; +use OC\App\CodeChecker\PrivateList; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -52,10 +53,12 @@ class CheckCode extends Command { protected function execute(InputInterface $input, OutputInterface $output) { $appId = $input->getArgument('app-id'); if ($input->getOption('deprecated')) { - $codeChecker = new DeprecationCodeChecker(); + $list = new DeprecationList(); } else { - $codeChecker = new CodeChecker(); + $list = new PrivateList(); } + $codeChecker = new CodeChecker($list); + $codeChecker->listen('CodeChecker', 'analyseFileBegin', function($params) use ($output) { if(OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { $output->writeln("<info>Analysing {$params}</info>"); |