Converter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @file Converter.php
5
 * @brief This file contains the Converter class.
6
 * @details
7
 *
8
 * @author Filippo F. Fadda
9
 * @author Mohammad @Taweel
10
 */
11
12
/**
13
 * @brief This namespace contains all the converters.
14
 */
15
16
namespace Converter;
17
18
/**
19
 * @brief This is an abstract converter.
20
 */
21
abstract class Converter
22
{
23
    protected $text;
24
    protected $id;
25
26
    /**
27
     * @brief Constructor.
28
     *
29
     * @param string $text the text to be converted
30
     * @param string $id   you can provide an identifier which is used in case an exception is raised during the
31
     *                     conversion process
32
     */
33
    public function __construct(string $text = null, string $id = null)
34
    {
35
        $this->text = $text;
36
        $this->id = $id;
37
    }
38
}
39