raystech /
laravel-starter-kit
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace Raystech\StarterKit\Traits; |
||||
| 4 | |||||
| 5 | trait HasTenant |
||||
| 6 | { |
||||
| 7 | /** |
||||
| 8 | * @return TenantRelationship relation |
||||
|
0 ignored issues
–
show
|
|||||
| 9 | */ |
||||
| 10 | public function tenant() { |
||||
| 11 | $model_type = get_class($this); |
||||
| 12 | return $this->hasOne('App\Models\TenantRelationship', 'model_id')->where('model_type', $model_type); |
||||
|
0 ignored issues
–
show
It seems like
hasOne() 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 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths