modify
This commit is contained in:
@@ -190,24 +190,6 @@ class Response extends HttpService
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $context
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
private function parseData($context): mixed
|
||||
{
|
||||
if (!empty($context) && !is_string($context)) {
|
||||
/** @var IFormatter $class */
|
||||
$class = $this->_format_maps[$this->format] ?? HtmlFormatter::class;
|
||||
|
||||
$di = Snowflake::getDi()->get($class);
|
||||
$context = $di->send($context)->getData();
|
||||
}
|
||||
return $context;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param mixed $content
|
||||
*/
|
||||
@@ -231,11 +213,9 @@ class Response extends HttpService
|
||||
return $this->endData;
|
||||
}
|
||||
|
||||
/** @var IFormatter $class */
|
||||
$class = $this->_format_maps[$this->format] ?? HtmlFormatter::class;
|
||||
|
||||
$di = Snowflake::getDi()->get($class);
|
||||
return $di->send($this->endData)->getData();
|
||||
return \di($class)->send($this->endData)->getData();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user