Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
48 | public function actionError(): \Exception |
||
49 | { |
||
50 | if (($exception = Yii::$app->getErrorHandler()->exception) === null) { |
||
51 | $exception = new NotFoundHttpException( |
||
52 | Yii::t('yii', 'Page not found.') |
||
53 | ); |
||
54 | } |
||
55 | |||
56 | Yii::$app->response->statusCode = isset($exception->statusCode) |
||
57 | ? $exception->statusCode |
||
58 | : 500; |
||
59 | |||
60 | return $exception; |
||
61 | } |
||
77 |