| 1 | <?php |
||
| 12 | class StringValue extends AbstractValue |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * StringValue constructor. |
||
| 16 | * |
||
| 17 | * @param string $value |
||
| 18 | */ |
||
| 19 | 1 | public function __construct($value) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | 1 | public function getValue() |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param $value |
||
| 37 | * @return bool |
||
| 38 | */ |
||
| 39 | 1 | private function canBeString($value) |
|
| 51 | } |
If an expression can have both
false, andnullas possible values. It is generally a good practice to always use strict comparison to clearly distinguish between those two values.