Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
4 | public function actionIndex() |
||
|
|||
5 | { |
||
6 | $session = Yii::app()->session; |
||
7 | $session->open(); |
||
8 | $this->incrementLoginDays(@$_SESSION['uid']); |
||
9 | |||
10 | $b = new CommonBadgeActivator; |
||
11 | $b->uid = @$_SESSION['uid']; |
||
12 | $b->triggerLoginDays(); |
||
13 | |||
14 | $this->redirect(['check']); |
||
15 | } |
||
16 | public function actionCheck() |
||
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: