Test Failed
Push — master ( ed7d3a...1e1c10 )
by Dominik
02:15
created

DocumentMapping::getLinkMappings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Chubbyphp\ApiSkeleton\Serialization;
6
7
use Chubbyphp\Serialization\Mapping\FieldMapping;
8
use Chubbyphp\Serialization\Mapping\FieldMappingInterface;
9
use Chubbyphp\Serialization\Mapping\LinkMappingInterface;
10
use Chubbyphp\Serialization\Mapping\ObjectMappingInterface;
11
use Chubbyphp\ApiSkeleton\Model\Document;
12
13
final class DocumentMapping implements ObjectMappingInterface
14
{
15
    /**
16
     * @return string
17
     */
18
    public function getClass(): string
19
    {
20
        return Document::class;
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function getType(): string
27
    {
28
        return 'document';
29
    }
30
31
    /**
32
     * @return FieldMappingInterface[]
33
     */
34
    public function getFieldMappings(): array
35
    {
36
        return [
37
            new FieldMapping('id'),
38
            new FieldMapping('name'),
39
            new FieldMapping('url'),
40
        ];
41
    }
42
43
    /**
44
     * @return FieldMappingInterface[]
45
     */
46
    public function getEmbeddedFieldMappings(): array
47
    {
48
        return [];
49
    }
50
51
    /**
52
     * @return LinkMappingInterface[]
53
     */
54
    public function getLinkMappings(): array
55
    {
56
        return [];
57
    }
58
}
59