Emailable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 10
c 0
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A emails() 0 5 1
1
<?php
2
3
namespace CleaniqueCoders\Profile\Concerns;
4
5
use Illuminate\Database\Eloquent\Relations\MorphMany;
6
7
/**
8
 * Emailable Trait.
9
 */
10
trait Emailable
11
{
12
    /**
13
     * Get all emails.
14
     */
15
    public function emails(): 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.email.model'),
19
            config('profile.providers.email.type')
20
        );
21
    }
22
}
23