Addressable::addresses()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
nc 1
nop 0
dl 0
loc 5
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace CleaniqueCoders\Profile\Concerns;
4
5
use Illuminate\Database\Eloquent\Relations\MorphMany;
6
7
/**
8
 * Addressable Trait.
9
 */
10
trait Addressable
11
{
12
    /**
13
     * Get all addresses.
14
     */
15
    public function addresses(): MorphMany
16
    {
17
        return $this->morphMany(
0 ignored issues
show
Bug introduced by
It seems like morphMany() 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

17
        return $this->/** @scrutinizer ignore-call */ morphMany(
Loading history...
18
            config('profile.providers.address.model'),
19
            config('profile.providers.address.type')
20
        );
21
    }
22
}
23