Test Failed
Pull Request — master (#88)
by Artem
04:05
created

IdentityProviderAuthenticatable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A identityProvider() 0 3 1
1
<?php
2
3
namespace Slides\Saml2\Concerns;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Slides\Saml2\Contracts\IdentityProvidable;
7
use Slides\Saml2\Models\IdentityProvider;
8
9
trait IdentityProviderAuthenticatable
10
{
11
    /**
12
     * The identity provider.
13
     *
14
     * @return Model|IdentityProvider|IdentityProvider
15
     */
16
    public function identityProvider()
17
    {
18
        $this->morphOne(config('saml2.idpModel'), 'tenant');
0 ignored issues
show
Bug introduced by
The function config was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        $this->morphOne(/** @scrutinizer ignore-call */ config('saml2.idpModel'), 'tenant');
Loading history...
Bug introduced by
It seems like morphOne() 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

18
        $this->/** @scrutinizer ignore-call */ 
19
               morphOne(config('saml2.idpModel'), 'tenant');
Loading history...
19
    }
20
}
21