src/Api/InvalidKeyException.php 1 location
|
@@ 34-40 (lines=7) @@
|
31 |
|
* |
32 |
|
* @return static The created exception. |
33 |
|
*/ |
34 |
|
public static function forKey($key, Exception $cause = null) |
35 |
|
{ |
36 |
|
return new static(sprintf( |
37 |
|
'Expected a key of type integer or string. Got: %s', |
38 |
|
is_object($key) ? get_class($key) : gettype($key) |
39 |
|
), 0, $cause); |
40 |
|
} |
41 |
|
} |
42 |
|
|
src/Api/UnsupportedValueException.php 1 location
|
@@ 55-62 (lines=8) @@
|
52 |
|
* |
53 |
|
* @return static The new exception. |
54 |
|
*/ |
55 |
|
public static function forValue($value, KeyValueStore $store, $code = 0, Exception $cause = null) |
56 |
|
{ |
57 |
|
return new static(sprintf( |
58 |
|
'Values of type %s are not supported by %s.', |
59 |
|
gettype($value), |
60 |
|
get_class($store) |
61 |
|
), $code, $cause); |
62 |
|
} |
63 |
|
} |
64 |
|
|