ItemC   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A AbsoluteLink() 0 3 1
A Link() 0 3 1
A Title() 0 3 1
A Content() 0 3 1
1
<?php
2
3
namespace CWP\Core\Tests\AtomFeedTest;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\View\ViewableData;
7
8
class ItemC extends ViewableData implements TestOnly
9
{
10
    // ItemC tests fields - Title has casting, Content doesn't.
11
    private static $casting = [
0 ignored issues
show
introduced by
The private property $casting is not used, and could be removed.
Loading history...
12
        'Title' => 'Varchar',
13
        'AltContent' => 'Text',
14
    ];
15
16
    public $Title = 'ItemC';
17
18
    public function Title()
19
    {
20
        return "ItemC";
21
    }
22
23
    public function Content()
24
    {
25
        return "ItemC Content";
26
    }
27
28
    public $AltContent = "ItemC AltContent";
29
30
    public function Link()
31
    {
32
        return "item-c.html";
33
    }
34
35
    public function AbsoluteLink()
36
    {
37
        return "http://www.example.com/item-c.html";
38
    }
39
}
40