| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Expression |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * The expression content |
||
| 13 | * |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $string; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The constructor accepts the expression as string |
||
| 20 | * |
||
| 21 | * @param string $string The content to prevent being quoted |
||
| 22 | */ |
||
| 23 | public function __construct($string = '') |
||
| 24 | { |
||
| 25 | $this->string = $string; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Return the unmodified expression |
||
| 30 | * |
||
| 31 | * @return string The unaltered content of the expression |
||
| 32 | */ |
||
| 33 | public function value() |
||
| 34 | { |
||
| 35 | return (string) $this->string; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Returns the unmodified expression |
||
| 40 | * |
||
| 41 | * @return string The unaltered content of the expression |
||
| 42 | */ |
||
| 43 | public function __toString() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |