| Total Complexity | 2 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | final class Tagged |
||
| 18 | { |
||
| 19 | /** @var string */ |
||
| 20 | public $tagName; |
||
| 21 | /** @var mixed */ |
||
| 22 | public $value; |
||
| 23 | |||
| 24 | private const NO_NAME = '%s Error: a tag MUST have a name'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Tag constructor. |
||
| 28 | * |
||
| 29 | * @param string $tagName the name of the tag like '!!str' |
||
| 30 | * @param mixed $raw any PHP variable type |
||
| 31 | * |
||
| 32 | * @throws \Exception if $tagName is an invalid string or absent |
||
| 33 | */ |
||
| 34 | public function __construct(string $tagName, $value) |
||
| 57 | } |