CleanupCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
A execute() 0 4 1
1
<?php
2
3
/**
4
 * @file CleanupCommand.php
5
 * @brief This file contains the CleanupCommand class.
6
 * @details
7
 * @author Filippo F. Fadda
8
 */
9
10
11
namespace EoC\CLI\Command;
12
13
14
use Symfony\Component\Console\Input\InputInterface;
15
use Symfony\Component\Console\Output\OutputInterface;
16
17
18
/**
19
 * @brief Removes all outdated view indexes.
20
 * @nosubgrouping
21
 */
22
class CleanupCommand extends AbstractCommand {
23
24
25
  /**
26
   * @brief Configures the command.
27
   */
28
  protected function configure() {
29
    $this->setName("cleanup");
30
    $this->setDescription("Removes all outdated view indexes");
31
  }
32
33
34
  /**
35
   * @brief Executes the command.
36
   */
37
  protected function execute(InputInterface $input, OutputInterface $output) {
38
    $couch = $this->getConnection();
39
    $couch->cleanupViews($this->getDatabase());
40
  }
41
42
}