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

AfterUpdate   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 19
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A configure() 0 5 1
A execute() 0 3 1
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