Passed
Pull Request — master (#11)
by Simon
01:34
created

StripeSlackPageController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A oops() 0 3 1
A success() 0 3 1
A SlackSignupForm() 0 3 1
1
<?php
2
3
namespace Firesphere\StripeSlack\Controller;
4
5
use Firesphere\StripeSlack\Form\SlackSignupForm;
6
use Firesphere\StripeSlack\Page\StripeSlackPage;
0 ignored issues
show
Bug introduced by
The type Firesphere\StripeSlack\Page\StripeSlackPage 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...
7
use PageController;
0 ignored issues
show
Bug introduced by
The type PageController 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...
8
9
/**
10
 * Class StripeSlackPage_Controller
11
 *
12
 * @property StripeSlackPage dataRecord
13
 * @method StripeSlackPage data()
14
 * @mixin StripeSlackPage dataRecord
15
 */
16
class StripeSlackPageController extends PageController
17
{
18
    private static $allowed_actions = [
0 ignored issues
show
introduced by
The private property $allowed_actions is not used, and could be removed.
Loading history...
19
        'SlackSignupForm',
20
        'success',
21
        'oops'
22
    ];
23
24
    public function SlackSignupForm()
25
    {
26
        return SlackSignupForm::create($this, __FUNCTION__);
0 ignored issues
show
Bug introduced by
__FUNCTION__ of type string is incompatible with the type array expected by parameter $args of SilverStripe\View\ViewableData::create(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

26
        return SlackSignupForm::create($this, /** @scrutinizer ignore-type */ __FUNCTION__);
Loading history...
Bug introduced by
$this of type Firesphere\StripeSlack\C...ripeSlackPageController is incompatible with the type array expected by parameter $args of SilverStripe\View\ViewableData::create(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

26
        return SlackSignupForm::create(/** @scrutinizer ignore-type */ $this, __FUNCTION__);
Loading history...
27
    }
28
29
    public function success()
30
    {
31
        return $this;
32
    }
33
34
    public function oops()
35
    {
36
        return $this;
37
    }
38
}
39