| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4.0582 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 3 | public function run() |
|
| 45 | { |
||
| 46 | 3 | if ($this->inlineLabel === false) { |
|
| 47 | $this->options['label'] = false; |
||
| 48 | } |
||
| 49 | 3 | if ($this->hasModel()) { |
|
| 50 | 3 | $input = Html::activeCheckbox($this->model, $this->attribute, $this->options); |
|
| 51 | 1 | } else { |
|
| 52 | 3 | $input = Html::checkbox($this->name, $this->checked, $this->options); |
|
| 53 | 1 | } |
|
| 54 | 3 | echo $this->inlineLabel ? $input : Html::tag('div', $input); |
|
| 55 | 3 | $this->selector = "#{$this->options['id']}"; |
|
| 56 | |||
| 57 | 3 | $this->registerClientScript(); |
|
| 58 | 3 | } |
|
| 59 | } |
||
| 60 |