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

MemberExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 17
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 5 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
}