DonationProduct   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 10
c 1
b 0
f 0
dl 0
loc 40
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCMSFields() 0 10 1
1
<?php
2
3
namespace Dynamic\FoxyStripe\Page;
4
5
use SilverStripe\Forms\FieldList;
6
7
class DonationProduct extends ProductPage
8
{
9
    /**
10
     * @var string
11
     */
12
    private static $singular_name = 'Donation';
0 ignored issues
show
introduced by
The private property $singular_name is not used, and could be removed.
Loading history...
13
14
    /**
15
     * @var string
16
     */
17
    private static $plural_name = 'Donations';
0 ignored issues
show
introduced by
The private property $plural_name is not used, and could be removed.
Loading history...
18
19
    /**
20
     * @var array
21
     */
22
    //private static $allowed_children = [];
23
24
    /**
25
     * @var bool
26
     */
27
    private static $can_be_root = true;
0 ignored issues
show
introduced by
The private property $can_be_root is not used, and could be removed.
Loading history...
28
29
    /**
30
     * @var string
31
     */
32
    private static $table_name = 'DonationProduct';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
33
34
    /**
35
     * @return FieldList
36
     */
37
    public function getCMSFields()
38
    {
39
        $fields = parent::getCMSFields();
40
41
        $fields->removeByName([
42
            'Weight',
43
            'Price',
44
        ]);
45
46
        return $fields;
47
    }
48
}
49