StripeSlackPage_Controller::oops()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
/**
4
 * Class StripeSlackPage
5
 *
6
 * This page does not have a unit test, as it's such a basic pagetype
7
 *
8
 * @property string $Success
9
 * @property string $Error
10
 */
11
class StripeSlackPage extends Page
0 ignored issues
show
Bug introduced by
The type Page was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
{
13
    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...
14
15
    private static $db = [
16
        'Success' => 'HTMLText',
17
        'Error'   => 'HTMLText'
18
    ];
19
20
    public function getCMSFields()
21
    {
22
        $fields = parent::getCMSFields();
23
        $fields->addFieldsToTab('Root.SlackMessages', [
24
            HtmlEditorField::create('Success', 'Success message'),
0 ignored issues
show
Bug introduced by
The type HtmlEditorField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
25
            HtmlEditorField::create('Error', 'Error message')
26
        ]);
27
28
        return $fields;
29
    }
30
}
31
32
/**
33
 * Class StripeSlackPage_Controller
34
 *
35
 * @property StripeSlackPage dataRecord
36
 * @method StripeSlackPage data()
37
 * @mixin StripeSlackPage dataRecord
38
 */
39
class StripeSlackPage_Controller extends Page_Controller
0 ignored issues
show
Bug introduced by
The type Page_Controller was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
40
{
41
    private static $allowed_actions = [
42
        'SlackSignupForm',
43
        'success',
44
        'oops'
45
    ];
46
47
    public function SlackSignupForm()
48
    {
49
        return SlackSignupForm::create($this, __FUNCTION__);
50
    }
51
52
    public function success()
53
    {
54
        return $this;
55
    }
56
57
    public function oops()
58
    {
59
        return $this;
60
    }
61
}
62