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

PostFormatter::format()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
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