Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | trait HasFormatTrait |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $defaultFormat = null; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $format = null; |
||
23 | |||
24 | public function withDefaultFormat(string $format): self |
||
25 | { |
||
26 | $this->defaultFormat = $format; |
||
27 | |||
28 | return $this; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param string|null $format |
||
33 | */ |
||
34 | public function withFormat(?string $format): void |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return ?string |
||
41 | */ |
||
42 | public function getFormat(): ?string |
||
45 | } |
||
46 | } |