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