Passed
Push — main ( 90c8f5...cf7c53 )
by Daniel
01:54
created

AbstractFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A formatList() 0 5 1
1
<?php declare(strict_types=1);
2
3
4
namespace RoadBunch\StringBean;
5
6
7
abstract class AbstractFormatter implements FormatterInterface
8
{
9
    abstract public function format(string $string): string;
10
11
    public function formatList(string ...$string): array
12
    {
13
        return array_map(function($val) {
14
            return $this->format($val);
15
        }, $string);
16
    }
17
}
18