Passed
Pull Request — master (#42)
by
unknown
01:59
created

RestfulServerTestAuthor::canView()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace SilverStripe\RestfulServer\Tests\Stubs;
4
5
use SilverStripe\RestfulServer\Tests\Stubs\RestfulServerTestPage;
6
use SilverStripe\RestfulServer\Tests\Stubs\RestfulServerTestAuthor;
7
use SilverStripe\RestfulServer\Tests\Stubs\RestfulServerTestAuthorRating;
8
use SilverStripe\ORM\DataObject;
9
use SilverStripe\Dev\TestOnly;
10
11
class RestfulServerTestAuthor extends DataObject implements TestOnly
12
{
13
    private static $api_access = true;
0 ignored issues
show
introduced by
The private property $api_access is not used, and could be removed.
Loading history...
14
15
    private static $table_name = 'RestfulServerTestAuthor';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
16
17
    private static $db = array(
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
18
        'Name' => 'Text',
19
    );
20
21
    private static $many_many = array(
0 ignored issues
show
introduced by
The private property $many_many is not used, and could be removed.
Loading history...
22
        'RelatedPages' => RestfulServerTestPage::class,
23
        'RelatedAuthors' => RestfulServerTestAuthor::class,
24
    );
25
26
    private static $has_many = array(
0 ignored issues
show
introduced by
The private property $has_many is not used, and could be removed.
Loading history...
27
        'PublishedPages' => RestfulServerTestPage::class,
28
        'Ratings' => RestfulServerTestAuthorRating::class,
29
    );
30
31
    public function canView($member = null)
32
    {
33
        return true;
34
    }
35
}
36