Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
75.00% |
3 / 4 |
CRAP | |
83.33% |
5 / 6 |
| SiteController | |
0.00% |
0 / 1 |
|
75.00% |
3 / 4 |
5.12 | |
83.33% |
5 / 6 |
| actions | |
100.00% |
1 / 1 |
2 | |
100.00% |
3 / 3 |
|||
| actionIndex | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| actionContact | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| actionAbout | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| <?php | |
| namespace frontend\controllers; | |
| use Yii; | |
| use yii\web\Controller; | |
| use yii\web\NotFoundHttpException; | |
| /** | |
| * Site controller | |
| */ | |
| class SiteController extends Controller | |
| { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function actions() | |
| { | |
| return [ | |
| 'error' => [ | |
| 'class' => 'yii\web\ErrorAction', | |
| ], | |
| 'captcha' => [ | |
| 'class' => 'yii\captcha\CaptchaAction', | |
| 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null, | |
| ], | |
| ]; | |
| } | |
| /** | |
| * Displays homepage. | |
| * | |
| * @return mixed | |
| */ | |
| public function actionIndex() | |
| { | |
| return (new PageController('page', $this->module, []))->actionView('home-page'); | |
| } | |
| /** | |
| * Displays contact page. | |
| * | |
| * @return mixed | |
| */ | |
| public function actionContact() | |
| { | |
| return (new PageController('page', $this->module, []))->actionView('contact-page'); | |
| } | |
| /** | |
| * Displays about page. | |
| * | |
| * @return mixed | |
| */ | |
| public function actionAbout() | |
| { | |
| return (new PageController('page', $this->module, []))->actionView('about-page'); | |
| } | |
| } |