| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | public function run() |
||
| 33 | { |
||
| 34 | $this->getView()->registerJs("$('.discount-popover').popover();", View::POS_READY, 'discount-popover'); |
||
| 35 | |||
| 36 | return Html::tag($this->tagName, |
||
|
|
|||
| 37 | Yii::$app->formatter->asPercent($this->current / 100), |
||
| 38 | [ |
||
| 39 | 'title' => Yii::t('hipanel/server', 'Next discount'), |
||
| 40 | 'class' => 'btn btn-default btn-xs discount-popover', |
||
| 41 | 'data-trigger' => 'focus', |
||
| 42 | 'data-content' => Yii::$app->formatter->asPercent($this->next / 100), |
||
| 43 | ]); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.