Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | 3 | public function attach($owner) |
|
36 | { |
||
37 | 3 | if ($owner->hasMethod('commonTag', false) === false) { |
|
38 | 1 | throw new InvalidConfigException( |
|
39 | 1 | Yii::t('app', 'You should add TagDependencyTrait to your model class {class}', ['class'=>$owner->className()]) |
|
40 | 1 | ); |
|
41 | } |
||
42 | 2 | return parent::attach($owner); |
|
43 | } |
||
44 | |||
46 |