RestartCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 23
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 RestartCommand.php
5
 * @brief This file contains the RestartCommand 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 Restarts CouchDB.
20
 * @nosubgrouping
21
 */
22
class RestartCommand extends AbstractCommand {
23
24
25
  /**
26
   * @brief Configures the command.
27
   */
28
  protected function configure() {
29
    $this->setName("restart");
30
    $this->setDescription("Restarts CouchDB server");
31
  }
32
33
34
  /**
35
   * @brief Executes the command.
36
   * @param[in] InputInterface $input The input interface
37
   * @param[in] OutputInterface $output The output interface
38
   */
39
  protected function execute(InputInterface $input, OutputInterface $output) {
40
    $couch = $this->getConnection();
41
    $couch->restartServer();
42
  }
43
44
}