From: Roeland Jago Douma Date: Tue, 6 Sep 2016 18:35:10 +0000 (+0200) Subject: Switch user:report from deprecated tablehelper to table X-Git-Tag: v11.0RC2~662^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1ec5e8a1abfd71b1b587ebba5acdf7d8aaf1d913;p=nextcloud-server.git Switch user:report from deprecated tablehelper to table --- diff --git a/core/Command/User/Report.php b/core/Command/User/Report.php index 01eb51f17f9..9a3bd9e5906 100644 --- a/core/Command/User/Report.php +++ b/core/Command/User/Report.php @@ -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() {