retourner la valeur
This commit is contained in:
parent
1dca3e8bee
commit
0bbc07311a
|
@ -44,8 +44,9 @@ class ValueException extends UserException {
|
||||||
return new static(self::message(null, $message, $kind, $prefix, " should not be null"));
|
return new static(self::message(null, $message, $kind, $prefix, " should not be null"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function check_null($value, ?string $kind=null, ?string $prefix=null, ?string $message=null): void {
|
static final function check_null($value, ?string $kind=null, ?string $prefix=null, ?string $message=null) {
|
||||||
if ($value === null) throw static::null($kind, $prefix, $message);
|
if ($value === null) throw static::null($kind, $prefix, $message);
|
||||||
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final function invalid_kind($value=null, ?string $kind=null, ?string $prefix=null, ?string $message=null): self {
|
static final function invalid_kind($value=null, ?string $kind=null, ?string $prefix=null, ?string $message=null): self {
|
||||||
|
|
Loading…
Reference in New Issue