AbstractOpts   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A asArray() 0 2 1
A reset() 0 3 1
1
<?php
2
3
/**
4
 * @file AbstractOpts.php
5
 * @brief This file contains the AbstractOpts class.
6
 * @details
7
 * @author Filippo F. Fadda
8
 */
9
10
11
//! The CouchDB's options namespace.
12
namespace EoC\Opt;
13
14
15
/**
16
 * @brief Superclass of all options classes.
17
 * @nosubgrouping
18
 */
19
abstract class AbstractOpts {
20
21
  protected $options = [];
22
23
24
  /**
25
   * @brief Resets the options.
26
   */
27
  public function reset() {
28
    unset($this->options);
29
    $this->options = [];
30
  }
31
32
33
  /**
34
   * @brief Returns an associative array of the chosen options.
35
   * @return array An associative array.
36
   */
37
  public function asArray() {
38
    return $this->options;
39
  }
40
41
}