ErrorController::actionIndex()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 6
nc 3
nop 0
1
<?php
2
class ErrorController extends Controller
3
{
4
    public function actionIndex()
5
    {
6
        if ($error=Yii::app()->errorHandler->error) {
7
            if (Yii::app()->request->isAjaxRequest) {
8
                echo $error['message'];
9
            } else {
10
                $this->render('index', $error);
11
            }
12
        }
13
    }
14
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
15