SiteTreeTest_ConflictedController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A hasActionTemplate() 0 6 2
1
<?php
2
3
namespace SilverStripe\CMS\Tests\Model;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\CMS\Controllers\ContentController;
7
8
class SiteTreeTest_ConflictedController extends ContentController implements TestOnly
9
{
10
    private static $allowed_actions = [
0 ignored issues
show
introduced by
The private property $allowed_actions is not used, and could be removed.
Loading history...
11
        'conflicted-action',
12
    ];
13
14
    public function hasActionTemplate($template)
15
    {
16
        if ($template == 'conflicted-template') {
17
            return true;
18
        } else {
19
            return parent::hasActionTemplate($template);
20
        }
21
    }
22
}
23