Auth0Model   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 20
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getIdAttribute() 0 3 1
A get_idAttribute() 0 3 1
A getKeyName() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arthur
5
 * Date: 13.10.18
6
 * Time: 22:22.
7
 */
8
9
namespace Modules\Auth0\Traits;
10
11
trait Auth0Model
12
{
13
    /**
14
     * Get the primary key for the model.
15
     *
16
     * @return string
17
     */
18
    public function getKeyName()
19
    {
20
        return 'identity_id';
21
    }
22
23
    public function getIdAttribute($value = null)
0 ignored issues
show
Unused Code introduced by
The parameter $value is not used and could be removed. ( Ignorable by Annotation )

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

23
    public function getIdAttribute(/** @scrutinizer ignore-unused */ $value = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
24
    {
25
        return $this->getKey();
0 ignored issues
show
Bug introduced by
The method getKey() does not exist on Modules\Auth0\Traits\Auth0Model. Did you maybe mean getKeyName()? ( Ignorable by Annotation )

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

25
        return $this->/** @scrutinizer ignore-call */ getKey();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
26
    }
27
28
    public function get_idAttribute($value = null)
0 ignored issues
show
Unused Code introduced by
The parameter $value is not used and could be removed. ( Ignorable by Annotation )

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

28
    public function get_idAttribute(/** @scrutinizer ignore-unused */ $value = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30
        return $this->getKey();
31
    }
32
}
33