Passed
Branch ss4 (364df2)
by Simon
01:53
created

StripeSlackPage::getCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace Firesphere\StripeSlack\Page;
4
5
use Page;
6
use SilverStripe\Forms\HTMLEditor\HTMLEditorField;
7
8
/**
9
 * Class StripeSlackPage
10
 *
11
 * This page does not have a unit test, as it's such a basic pagetype
12
 *
13
 * @property string $Success
14
 * @property string $Error
15
 */
16
class StripeSlackPage extends Page
17
{
18
    private static $description = 'Slack signup page';
0 ignored issues
show
Unused Code introduced by
The property $description 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...
19
20
    private static $db = [
1 ignored issue
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...
21
        'Success' => 'HTMLText',
22
        'Error'   => 'HTMLText'
23
    ];
24
25
    private static $table_name = 'StripeSlackPage';
1 ignored issue
show
Unused Code introduced by
The property $table_name 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...
26
27
    public function getCMSFields()
28
    {
29
        $fields = parent::getCMSFields();
30
        $fields->addFieldsToTab('Root.SlackMessages', [
31
            HtmlEditorField::create('Success', 'Success message'),
32
            HtmlEditorField::create('Error', 'Error message')
33
        ]);
34
35
        return $fields;
36
    }
37
}
38