Passed
Push — master ( 5d259d...069a18 )
by Conrad
02:00
created

src/Models/AccessToken.php (3 issues)

overwriting of private properties.

Comprehensibility Informational

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace AdvancedLearning\Oauth2Server\Models;
4
5
use SilverStripe\ORM\DataObject;
6
use SilverStripe\Security\Member;
7
8
/**
9
 * Class AccessToken
10
 *
11
 * @package AdvancedLearning\Oauth2Server\Models
12
 *
13
 * @property string $Identifier
14
 * @property string $Scopes
15
 * @property string $Name
16
 * @property string $ExpiryDatetime
17
 * @property bool   $Revoked
18
 */
19
class AccessToken extends DataObject
20
{
21
    private static $table_name = 'OauthAccessToken';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
22
23
    private static $db = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
24
        'Identifier' => 'Varchar(255)',
25
        'Scopes' => 'Text',
26
        'Name' => 'Varchar(255)',
27
        'ExpireDateTime' => 'Datetime',
28
        'Revoked' => 'Boolean'
29
    ];
30
31
    private static $summary_fields = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
32
        'Name',
33
        'ExpireDateTime',
34
        'Revoked'
35
    ];
36
37
    /**
38
     * Get the Member associated with this AccessToken.
39
     *
40
     * @return Member
41
     */
42
    public function getMember()
43
    {
44
        return Member::get()->byID($this->Identifier);
45
    }
46
}
47