| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | final class ScalarEvent implements ScalarEventInterface |
||
| 9 | { |
||
| 10 | |||
| 11 | private $data; |
||
| 12 | |||
| 13 | private $path; |
||
| 14 | |||
| 15 | public function __construct($data, PathInterface $path) |
||
| 16 | { |
||
| 17 | if (null !== $data && !is_scalar($data)) { |
||
| 18 | throw new Exception\InvalidScalarDataException($data); |
||
| 19 | } |
||
| 20 | $this->data = $data; |
||
| 21 | $this->path = $path; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getData() |
||
| 25 | { |
||
| 26 | return $this->data; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getPath(): PathInterface |
||
| 32 | } |
||
| 33 | } |
||
| 34 |