Completed
Push — master ( 7980e3...37c07d )
by Simon
11:26
created

MemberExtension::updateCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 5
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
namespace Firesphere\GraphQLJWT;
3
4
5
use SilverStripe\Forms\FieldList;
6
use SilverStripe\ORM\DataExtension;
7
8
/**
9
 * Class MemberExtension
10
 * Add a unique token to the Member for extra validation
11
 */
12
class MemberExtension extends DataExtension
13
{
14
15
    private static $db = [
0 ignored issues
show
Unused Code introduced by
The property $db is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
16
        'JWTUniqueID' => 'Varchar(255)',
17
    ];
18
19
    private static $indexes = [
0 ignored issues
show
Unused Code introduced by
The property $indexes is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
20
        'JWTUniqueID' => 'unique'
21
    ];
22
23
    public function updateCMSFields(FieldList $fields)
24
    {
25
        parent::updateCMSFields($fields);
26
        $fields->removeByName(['JWTUniqueID']);
27
    }
28
}