| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class StringAttribute implements AttributeInterface |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var StringInterface |
||
| 17 | */ |
||
| 18 | private $string; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param StringInterface $string |
||
| 22 | */ |
||
| 23 | 3 | public function __construct(StringInterface $string) |
|
| 24 | { |
||
| 25 | 3 | $this->string = $string; |
|
| 26 | 3 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @return StringInterface |
||
| 30 | * @psalm-pure |
||
| 31 | */ |
||
| 32 | 1 | public function asString(): StringInterface |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return bool |
||
| 39 | * @psalm-pure |
||
| 40 | */ |
||
| 41 | 1 | public function asBoolean(): bool |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return int |
||
| 48 | * @psalm-pure |
||
| 49 | */ |
||
| 50 | 1 | public function asInteger(): int |
|
| 55 |