| 1 | <?php |
||
| 8 | class ExpoDatabaseDriver implements ExpoRepository |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Stores an Expo token with a given identifier. |
||
| 12 | * |
||
| 13 | * @param $key |
||
| 14 | * @param $value |
||
| 15 | * |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | 3 | public function store($key, $value): bool |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Retrieves an Expo token with a given identifier. |
||
| 30 | * |
||
| 31 | * @param string $key |
||
| 32 | * |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | public function retrieve(string $key) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Removes an Expo token with a given identifier. |
||
| 42 | * |
||
| 43 | * @param string $key |
||
| 44 | * @param string $value |
||
| 45 | * |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | 2 | public function forget(string $key, string $value = null): bool |
|
| 58 | } |
||
| 59 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: