Test Failed
Pull Request — master (#20)
by Alexander
04:07 queued 01:32
created

PostFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Blog;
6
7
final class PostFormatter
8
{
9
    public function format(Post $post): array
10
    {
11
        return [
12
            'id' => $post->getId(),
13
            'title' => $post->getTitle(),
14
            'content' => $post->getContent(),
15
        ];
16
    }
17
}
18