Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class Constant implements GeneratorInterface |
||
13 | { |
||
14 | /** |
||
15 | * Arbitrary constant value. |
||
16 | * |
||
17 | * @var mixed |
||
18 | */ |
||
19 | private $constant; |
||
20 | |||
21 | /** |
||
22 | * @param $constant |
||
23 | */ |
||
24 | public function __construct($constant) |
||
25 | { |
||
26 | if (null !== $constant && !\is_string($constant)) { |
||
27 | throw new InvalidConstantException('Constant value must be null or string'); |
||
28 | } |
||
29 | |||
30 | $this->constant = $constant; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function generate() |
||
39 | } |
||
40 | } |
||
41 |