Completed
Push — master ( d9d1e2...b73c31 )
by Ruben
01:14
created

DefaultSerializer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 9 1
1
<?php
2
3
namespace Spatie\ResourceLinks\Serializers;
4
5
class DefaultSerializer implements Serializer
6
{
7
    public function format(LinkContainer $linkContainer): array
8
    {
9
        return [
10
            "{$linkContainer->prefix}{$linkContainer->name}" => [
11
                'method' => $linkContainer->method,
12
                'action' => $linkContainer->action,
13
            ],
14
        ];
15
    }
16
}
17