| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | final class ConstantStringType extends GenericStringType implements ConstantScalarType |
||
| 16 | { |
||
| 17 | /** @var string */ |
||
| 18 | private $value; |
||
| 19 | |||
| 20 | public function __construct(string $value) |
||
| 21 | { |
||
| 22 | $this->value = $value; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getValue() : string |
||
| 26 | { |
||
| 27 | return $this->value; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function describe() : string |
||
| 31 | { |
||
| 32 | return sprintf('"%s"', addcslashes($this->value, '"')); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function validate($value) : bool |
||
| 38 | } |
||
| 39 | } |
||
| 40 |