Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
9 | abstract class AbstractFormatter implements FormatterInterface |
||
10 | { |
||
11 | /** @var int */ |
||
12 | protected $options; |
||
13 | |||
14 | /** {@inheritDoc} */ |
||
15 | 4 | public function __construct(?int $options = null) |
|
16 | { |
||
17 | 4 | $this->options = $options ?? 0; |
|
18 | 4 | } |
|
19 | |||
20 | /** {@inheritDoc} */ |
||
21 | 2 | public function format(Formattable $formattable): string |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @param object $data |
||
36 | * @param string $class |
||
37 | * @return string |
||
38 | */ |
||
39 | 1 | protected function errorMessage(object $data, string $class): string |
|
45 |