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

Auth0Model::getKeyName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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