Converter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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