Passed
Push — main ( 1ec61d...d7eba8 )
by Michael
03:41
created

ExampleFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A format() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Formatters;
6
7
use Illuminate\Support\Collection;
8
use MichaelRubel\Formatters\Formatter;
9
10
class ExampleFormatter implements Formatter
11
{
12
    /**
13
     * Format the date.
14
     *
15
     * @param Collection $items
16
     *
17
     * @return string
18
     */
19
    public function format(Collection $items): string
20
    {
21
        return $items->first();
22
    }
23
}
24