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

ExampleFormatter::format()   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 1
dl 0
loc 3
rs 10
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