ItemA::Content()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
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