Passed
Pull Request — master (#8)
by Robbie
03:25
created

ViewableVersionedObject   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A canView() 0 3 1
1
<?php
2
3
namespace SilverStripe\VersionedAdmin\Tests\Controllers\HistoryViewerControllerTest;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\ORM\DataObject;
7
use SilverStripe\Versioned\Versioned;
8
9
class ViewableVersionedObject extends DataObject implements TestOnly
10
{
11
    private static $db = [
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
12
        'Title' => 'Varchar',
13
    ];
14
15
    private static $table_name = 'Test_ViewableVersionedObject';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
16
17
    private static $extensions = [
0 ignored issues
show
introduced by
The private property $extensions is not used, and could be removed.
Loading history...
18
        Versioned::class,
19
    ];
20
21
    public function canView($member = null)
22
    {
23
        return true;
24
    }
25
}
26