Converter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * @file Converter.php
5
 * @brief This file contains the Converter class.
6
 * @details
7
 * @author Filippo F. Fadda
8
 */
9
10
11
/**
12
 * @brief This namespace contains all the converters.
13
 */
14
namespace Converter;
15
16
/**
17
 * @brief This is an abstract converter.
18
 */
19
abstract class Converter {
20
  protected $text;
21
  protected $id;
22
23
24
  /**
25
   * @brief Constructor.
26
   * @param string $text The text to be converted.
27
   * @param string $id You can provide an identifier which is used in case an exception is raised during the
28
   * conversion process.
29
   */
30
  public function __construct($text, $id = '') {
31
    $this->text = $text;
32
    $this->id = (string)$id;
33
  }
34
35
}