TestObject::canView()   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
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Tests;
5
6
use SilverStripe\Dev\TestOnly;
7
use SilverStripe\ORM\DataObject;
8
9
class TestObject extends DataObject implements TestOnly
10
{
11
    private static $table_name = 'TestObject';
12
13
    private static $db = [
14
        'Title'        => 'Varchar(255)',
15
        'ShowInSearch' => 'Boolean',
16
    ];
17
18
    private static $has_many = [
19
        'TestPages'    => TestPage::class,
20
        'TestRelation' => TestRelationObject::class,
21
    ];
22
23
    public function canView($member = null)
24
    {
25
        return true;
26
    }
27
}
28