Completed
Pull Request — master (#12)
by Matthew
11:11
created

SampleManageableObjectPage_Controller   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 37
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Form() 0 3 1
A init() 0 4 1
1
<?php
2
3
/**
4
 * Class SampleManageableObjectPage
5
 */
6
class SampleManageableObjectPage extends Page implements TestOnly
0 ignored issues
show
Bug introduced by
The type TestOnly 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
{
8
9
}
10
11
/**
12
 * Class SampleManageableObjectPage_Controller
13
 */
14
class SampleManageableObjectPage_Controller extends Page_Controller implements TestOnly
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
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...
15
{
16
17
    /**
18
     * @var array
19
     */
20
    private static $allowed_actions = [
0 ignored issues
show
introduced by
The private property $allowed_actions is not used, and could be removed.
Loading history...
21
        'Form',
22
    ];
23
24
    /**
25
     * @var array
26
     */
27
    private static $extensions = [
0 ignored issues
show
introduced by
The private property $extensions is not used, and could be removed.
Loading history...
28
        ManageableDataObjectExtension::class
29
    ];
30
31
    /**
32
     * @var string
33
     */
34
    private static $managed_object = SampleManageableDataObject::class;
0 ignored issues
show
introduced by
The private property $managed_object is not used, and could be removed.
Loading history...
35
36
    /**
37
     *
38
     */
39 4
    public function init()
40
    {
41 4
        parent::init();
42 4
        Requirements::clear();
43 4
    }
44
45 4
    public function Form()
46
    {
47 4
        return ManageableDataObjectForm::create($this, 'Form', $this->config()->get('managed_object'));
0 ignored issues
show
Bug introduced by
The type ManageableDataObjectForm 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...
48
    }
49
50
}