| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function run() |
||
| 30 | { |
||
| 31 | $curr = $this->getCurrentUrl(); |
||
| 32 | $ref = $this->getReferrerUrl(); |
||
| 33 | if ($curr === $ref) { |
||
| 34 | Yii::$app->session[$this->getIdentifier()] = Yii::$app->session[$this->getIdentifier()] + 1; |
||
| 35 | } else { |
||
| 36 | Yii::$app->session[$this->getIdentifier()] = 1; |
||
| 37 | } |
||
| 38 | $this->registerClientScript(); |
||
| 39 | Html::addCssClass($this->options, $this->selectorClass); |
||
| 40 | |||
| 41 | return Html::button($this->getLabel(), $this->options); |
||
| 42 | } |
||
| 43 | |||
| 92 |