Completed
Push — master ( 150a3d...219536 )
by
unknown
04:07
created

AfterUpdate::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
/**
3
 * ownCloud - News
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author Bernhard Posselt <[email protected]>
9
 * @copyright Bernhard Posselt 2016
10
 */
11
12
namespace OCA\News\Command\Updater;
13
14
use Exception;
15
16
use Symfony\Component\Console\Command\Command;
17
use Symfony\Component\Console\Input\InputInterface;
18
use Symfony\Component\Console\Output\OutputInterface;
19
20
use \OCA\News\Utility\Updater;
21
22
class AfterUpdate extends Command {
23
    private $updater;
24
25
    public function __construct(Updater $updater) {
26
        parent::__construct();
27
        $this->updater = $updater;
28
    }
29
30
    protected function configure() {
31
        $this->setName('news:updater:after-update')
32
            ->setDescription('This is used to clean up the database. It ' .
33
                             'removes old read articles which are not starred');
34
    }
35
36
    protected function execute(InputInterface $input, OutputInterface $output) {
37
        $this->updater->afterUpdate();
38
    }
39
40
}
41