Test Failed
Push — master ( 61306e...ae5494 )
by Julien
04:39
created

RawArraySerializer::item()   A

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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Zemit\Fractal\Serializer;
4
5
use League\Fractal\Serializer\ArraySerializer;
6
7
class RawArraySerializer extends ArraySerializer
8
{
9
    /**
10
     * {@inheritDoc}
11
     */
12
    public function collection(?string $resourceKey, array $data): array
13
    {
14
        return $data;
15
    }
16
    
17
    /**
18
     * {@inheritDoc}
19
     */
20
    public function item(?string $resourceKey, array $data): array
21
    {
22
        return $data;
23
    }
24
    
25
    /**
26
     * {@inheritDoc}
27
     */
28
    public function null(): ?array
29
    {
30
        return [];
31
    }
32
}
33