| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | View Code Duplication | public function lock() |
|
| 40 | { |
||
| 41 | /* @var $owner ActiveRecord */ |
||
| 42 | $owner = $this->owner; |
||
| 43 | |||
| 44 | $owner->{$this->lockedAttribute} = $this->valueLock; |
||
| 45 | if(!$owner->validate()) |
||
| 46 | throw new \yii\db\Exception('Error saving model! Validating not comlete: ' . implode('; ', $owner->firstErrors)); |
||
| 47 | $owner->save(); |
||
| 48 | } |
||
| 49 | |||
| 62 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.