mirror of
https://codeberg.org/reflect/reflect-client-php.git
synced 2025-09-13 17:43:42 +02:00
wip: 1682607562
This commit is contained in:
parent
39ad645cda
commit
7df410bb59
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attempt to resolve Method from backed enum string, or return default
|
// Attempt to resolve Method from backed enum string, or return default
|
||||||
private static function resolve_method(string $method): Method {
|
private static function resolve_method(Method|string $method): Method {
|
||||||
return ($method instanceof Method)
|
return ($method instanceof Method)
|
||||||
? $method
|
? $method
|
||||||
: Method::tryFrom($method) ?? (__CLASS__)::HTTP_DEFAULT_METHOD;
|
: Method::tryFrom($method) ?? (__CLASS__)::HTTP_DEFAULT_METHOD;
|
||||||
|
|
Loading…
Add table
Reference in a new issue