Passed
Push — master ( b59ea0...ef0b76 )
by Simon
02:07
created

TestPage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getSalutation() 0 3 1
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Tests;
5
6
use Page;
1 ignored issue
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...
7
use SilverStripe\Dev\TestOnly;
8
9
/**
10
 * Class TestPage
11
 * @package Firesphere\SolrSearch\Tests
12
 */
13
class TestPage extends Page implements TestOnly
14
{
15
    /**
16
     * @var array
17
     */
18
    private static $has_one = [
1 ignored issue
show
introduced by
The private property $has_one is not used, and could be removed.
Loading history...
19
        'TestObject' => TestObject::class,
20
    ];
21
22
    /**
23
     * @var array
24
     */
25
    private static $has_many = [
1 ignored issue
show
introduced by
The private property $has_many is not used, and could be removed.
Loading history...
26
    ];
27
28
    /**
29
     * @return string
30
     */
31
    public function getSalutation()
32
    {
33
        return sprintf('Dear %s', $this->Title);
34
    }
35
}
36