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

identityProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
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