| 1 | <?php |
||
| 9 | class CellTypeHelper |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param $value |
||
| 13 | * @return bool Whether the given value is considered "empty" |
||
| 14 | */ |
||
| 15 | 113 | public static function isEmpty($value) |
|
| 19 | |||
| 20 | /** |
||
| 21 | * @param $value |
||
| 22 | * @return bool Whether the given value is a non empty string |
||
| 23 | */ |
||
| 24 | 108 | public static function isNonEmptyString($value) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Returns whether the given value is numeric. |
||
| 31 | * A numeric value is from type "integer" or "double" ("float" is not returned by gettype). |
||
| 32 | * |
||
| 33 | * @param $value |
||
| 34 | * @return bool Whether the given value is numeric |
||
| 35 | */ |
||
| 36 | 110 | public static function isNumeric($value) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Returns whether the given value is boolean. |
||
| 45 | * "true"/"false" and 0/1 are not booleans. |
||
| 46 | * |
||
| 47 | * @param $value |
||
| 48 | * @return bool Whether the given value is boolean |
||
| 49 | */ |
||
| 50 | 115 | public static function isBoolean($value) |
|
| 54 | } |
||
| 55 |