Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 8 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
49 | View Code Duplication | protected function beforeAction($action) |
|
50 | { |
||
51 | if (!Yii::app()->params['isPartOfWline']) { |
||
52 | throw new CHttpException(1, 'Ez az aloldal nem használható. ' . CHtml::link('főoldal', '/')); //own nick |
||
53 | } |
||
54 | |||
55 | return true; |
||
56 | } |
||
57 | } |
||
58 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: