1 | <?php |
||||||
2 | |||||||
3 | namespace lhs\Yii2SaveRelationsBehavior; |
||||||
4 | |||||||
5 | trait SaveRelationsTrait |
||||||
6 | { |
||||||
7 | |||||||
8 | public function load($data, $formName = null) |
||||||
9 | { |
||||||
10 | $loaded = parent::load($data, $formName); |
||||||
11 | if ($loaded && $this->hasMethod('loadRelations')) { |
||||||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
12 | $this->loadRelations($data); |
||||||
0 ignored issues
–
show
It seems like
loadRelations() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
13 | } |
||||||
14 | return $loaded; |
||||||
15 | } |
||||||
16 | } |