| Total Complexity | 5 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class BasicFilename |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $format; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * BasicFilename constructor. |
||
| 30 | * |
||
| 31 | * @param string $format |
||
| 32 | */ |
||
| 33 | 591 | public function __construct(string $format) |
|
| 34 | { |
||
| 35 | 591 | $this->format = $format; |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Get the format |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function getFormat(): string |
||
| 44 | { |
||
| 45 | return $this->format; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Create the path for a key |
||
| 50 | * |
||
| 51 | * @param string $key |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | 591 | public function __invoke(string $key): string |
|
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Cast to string |
||
| 61 | * |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function __toString(): string |
||
| 67 | } |
||
| 68 | } |