AbstractOpts::reset()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
}