RestfulServerTestAuthor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 17
c 1
b 0
f 1
dl 0
loc 29
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A canView() 0 3 1
1
<?php
2
3
namespace SilverStripe\RestfulServer\Tests\Stubs;
4
5
use SilverStripe\Dev\TestOnly;
6
use SilverStripe\ORM\DataObject;
7
8
class RestfulServerTestAuthor extends DataObject implements TestOnly
9
{
10
    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...
11
12
    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...
13
14
    private static $db = array(
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
15
        'FirstName' => 'Text',
16
    );
17
18
    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...
19
        'RelatedPages' => RestfulServerTestPage::class,
20
        'RelatedAuthors' => RestfulServerTestAuthor::class,
21
        'SortedPages' => [
22
            'through' => AuthorSortedPageRelation::class,
23
            'from' => 'Parent',
24
            'to' => 'SortedPage',
25
        ],
26
    );
27
28
    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...
29
        'PublishedPages' => RestfulServerTestPage::class,
30
        'Ratings' => RestfulServerTestAuthorRating::class,
31
        'SortedPagesRelation' => AuthorSortedPageRelation::class . '.Parent',
32
    );
33
34
    public function canView($member = null)
35
    {
36
        return true;
37
    }
38
}
39