]> source.dussan.org Git - nextcloud-server.git/commitdiff
Switch user:report from deprecated tablehelper to table
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 6 Sep 2016 18:35:10 +0000 (20:35 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 6 Sep 2016 19:20:01 +0000 (21:20 +0200)
core/Command/User/Report.php

index 01eb51f17f9cf54ba67debe18c15247532db42fd..9a3bd9e5906f536f427f69d99adc106681da347f 100644 (file)
@@ -27,6 +27,7 @@ namespace OC\Core\Command\User;
 
 use OCP\IUserManager;
 use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Helper\Table;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
 
@@ -49,8 +50,7 @@ class Report extends Command {
        }
 
        protected function execute(InputInterface $input, OutputInterface $output) {
-               /** @var \Symfony\Component\Console\Helper\TableHelper $table */
-               $table = $this->getHelperSet()->get('table');
+               $table = new Table($output);
                $table->setHeaders(array('User Report', ''));
                $userCountArray = $this->countUsers();
                if(!empty($userCountArray)) {
@@ -72,7 +72,7 @@ class Report extends Command {
                $rows[] = array('user directories', $userDirectoryCount);
 
                $table->setRows($rows);
-               $table->render($output);
+               $table->render();
        }
 
        private function countUsers() {