ItemA   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

4 Methods

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