Skip to content

Commit 3083710

Browse files
committed
[chore]Tweak
1 parent 138e495 commit 3083710

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SwaggerAction.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
namespace light\swagger;
1313

14+
use Yii;
1415
use yii\base\Action;
16+
use yii\web\Response;
1517

1618
/**
1719
* The document display action.
@@ -41,7 +43,7 @@ class SwaggerAction extends Action
4143

4244
public function run()
4345
{
44-
\Yii::$app->response->format = \yii\web\Response::FORMAT_HTML;
46+
Yii::$app->getResponse()->format = Response::FORMAT_HTML;
4547

4648
$this->controller->layout = false;
4749

0 commit comments

Comments
 (0)