Passed
Push — master ( e5b31a...cf340d )
by Arthur
04:48
created

Auth0Model   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 20
ccs 4
cts 6
cp 0.6667
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
12
trait Auth0Model
13
{
14
    /**
15
     * Get the primary key for the model.
16
     *
17
     * @return string
18
     */
19 19
    public function getKeyName()
20
    {
21 19
        return 'identity_id';
22
    }
23
24 1
    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

24
    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...
25
    {
26 1
        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

26
        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...
27
    }
28
29
    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

29
    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...
30
    {
31
        return $this->getKey();
32
    }
33
}
34