| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 11 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | View Code Duplication | public function unlock() |
|
| 51 | { |
||
| 52 | /* @var $owner ActiveRecord */ |
||
| 53 | $owner = $this->owner; |
||
| 54 | |||
| 55 | $owner->{$this->lockedAttribute} = $this->valueUnlock; |
||
| 56 | if(!$owner->validate()) |
||
| 57 | throw new \yii\db\Exception('Error saving model! Validating not comlete: ' . implode('; ', $owner->firstErrors)); |
||
| 58 | |||
| 59 | $owner->save(); |
||
| 60 | } |
||
| 61 | } |
||
| 62 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.