1 | <?php |
||
14 | abstract class AbstractValue implements Value |
||
15 | { |
||
16 | /** @var int|string */ |
||
17 | private $value; |
||
18 | |||
19 | /** |
||
20 | * ScalarValue constructor. |
||
21 | * |
||
22 | * @param int|string $value |
||
23 | * |
||
24 | * @throws \UnexpectedValueException |
||
25 | */ |
||
26 | public function __construct($value) |
||
33 | |||
34 | /** |
||
35 | * @return int|string |
||
36 | */ |
||
37 | public function getValue() |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getTitle() |
||
49 | |||
50 | /** |
||
51 | * @param mixed $other |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function equals($other) |
||
61 | |||
62 | /** |
||
63 | * @param mixed $other |
||
64 | * |
||
65 | * @return bool |
||
66 | */ |
||
67 | public function notEquals($other) |
||
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function __toString() |
||
79 | } |
||
80 |