AbstractCmd   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * @file AbstractCmd.php
5
 * @brief This file contains the AbstractCmd class.
6
 * @details
7
 * @author Filippo F. Fadda
8
 */
9
10
11
//! This namespace contains all the available concrete commands.
12
namespace EoC\Command;
13
14
15
use EoC\Server;
16
17
18
/*
19
 * @brief This class defines the ancestor for all the concrete Server commands.
20
 * @details To create a new command you must inherit from this class. This is the only extension point for commands.
21
 * In case of CouchDB design documents' structure changes, you just need to create a new command, starting from here.
22
 * @nosubgrouping
23
 */
24
abstract class AbstractCmd implements CmdInterface {
25
26
  protected $server;
27
  protected $args;
28
29
30
  /**
31
   * @brief Creates an instance of a concrete command.
32
   * @param[in] Server $server An instance of Server class.
33
   * @param[in] array $args An array of arguments.
34
   */
35
  public function __construct(Server $server, $args) {
36
    $this->server = $server;
37
    $this->args = $args;
38
  }
39
40
}