Completed
Push — master ( 3c0dd3...6d048a )
by Andrii
14:00
created

EmptyResource   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 37
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A getId() 0 4 1
A getMeta() 0 4 1
A getLinks() 0 4 1
A getAttributes() 0 4 1
A getDefaultIncludedRelationships() 0 4 1
A getRelationships() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace hiapi\jsonApi;
5
6
use WoohooLabs\Yin\JsonApi\Schema\Link\ResourceLinks;
7
use WoohooLabs\Yin\JsonApi\Schema\Resource\AbstractResource;
8
9
final class EmptyResource extends AbstractResource
10
{
11
    public function getType($entity): string
12
    {
13
        return 'empty';
14
    }
15
16
    public function getId($entity): string
17
    {
18
        return '';
19
    }
20
21
    public function getMeta($entity): array
22
    {
23
        return [];
24
    }
25
26
    public function getLinks($entity): ?ResourceLinks
27
    {
28
        return null;
29
    }
30
31
    public function getAttributes($entity): array
32
    {
33
        return [];
34
    }
35
36
    public function getDefaultIncludedRelationships($entity): array
37
    {
38
        return [];
39
    }
40
41
    public function getRelationships($entity): array
42
    {
43
        return [];
44
    }
45
}
46