| Conditions | 4 |
| Paths | 8 |
| Total Lines | 41 |
| Lines | 24 |
| Ratio | 58.54 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | protected function initDefaultButtons() |
||
| 15 | { |
||
| 16 | View Code Duplication | if (!isset($this->buttons['view'])) { |
|
| 17 | $this->buttons['view'] = function ($url, $model) { |
||
|
|
|||
| 18 | return Html::a( |
||
| 19 | Icon::show('eye', ['class' => 'fa-lg'], Icon::FA), |
||
| 20 | $url, |
||
| 21 | [ |
||
| 22 | 'title' => \Yii::t('yii', 'View'), |
||
| 23 | 'data-pjax' => '0', |
||
| 24 | ] |
||
| 25 | ); |
||
| 26 | }; |
||
| 27 | } |
||
| 28 | View Code Duplication | if (!isset($this->buttons['update'])) { |
|
| 29 | $this->buttons['update'] = function ($url, $model) { |
||
| 30 | return Html::a( |
||
| 31 | Icon::show('edit', ['class' => 'fa-lg'], Icon::FA), |
||
| 32 | $url, |
||
| 33 | [ |
||
| 34 | 'title' => \Yii::t('yii', 'Update'), |
||
| 35 | 'data-pjax' => '0', |
||
| 36 | ] |
||
| 37 | ); |
||
| 38 | }; |
||
| 39 | } |
||
| 40 | if (!isset($this->buttons['delete'])) { |
||
| 41 | $this->buttons['delete'] = function ($url, $model) { |
||
| 42 | return Html::a( |
||
| 43 | Icon::show('trash-o', ['class' => 'fa-lg'], Icon::FA), |
||
| 44 | $url, |
||
| 45 | [ |
||
| 46 | 'title' => \Yii::t('yii', 'Delete'), |
||
| 47 | 'data-confirm' => \Yii::t('yii', 'Are you sure to delete this item?'), |
||
| 48 | 'data-method' => 'post', |
||
| 49 | 'data-pjax' => '0', |
||
| 50 | ] |
||
| 51 | ); |
||
| 52 | }; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.