This commit is contained in:
2021-09-06 17:59:12 +08:00
parent 42f057bc8a
commit 21c7f383bb
10 changed files with 18 additions and 429 deletions
+2 -5
View File
@@ -29,10 +29,7 @@ class Response implements ResponseInterface
*/
public function __call($name, $args)
{
if (!method_exists($this, $name)) {
return $this->__call__()->{$name}(...$args);
}
return $this->{$name}(...$args);
return $this->__call__()->{$name}(...$args);
}
/**
@@ -50,6 +47,6 @@ class Response implements ResponseInterface
*/
public function __call__(): Psr7Response
{
return Context::getContext(Psr7Response::class, new Psr7Response());
return Context::getContext(ResponseInterface::class, new Psr7Response());
}
}