It seems like hasAttribute() 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 ignore-call annotation
44
if ($this->/** @scrutinizer ignore-call */ hasAttribute(TenantInterface::ATTRIBUTE_NAME)) {
Loading history...
45
1
unset($fields[TenantInterface::ATTRIBUTE_NAME]);
46
1
}
47
48
1
return $fields;
49
}
50
51
52
53
/**
54
* This method is invoked before assign the attribute tenant id
55
* You may override this method to do preliminary checks before apply tenant id.
56
* @return boolean whether the tenant id should be assigned. Defaults to true.
57
*/
58
1
protected function beforeApplyTenant()
59
{
60
1
return true;
61
}
62
63
/**
64
* This method is invoked after assign the attribute tenant id
65
* You may override this method to do postprocessing after apply tenant id.