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

StripeSlackPage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1
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