Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
5 | class Slugify |
||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | protected const MAP = [' ' => '-', '_' => '-']; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected const OPTIONS = 'Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();'; |
||
16 | |||
17 | /** |
||
18 | * @param string $source |
||
19 | * @param string $postfix |
||
20 | * |
||
21 | * @return string |
||
22 | * |
||
23 | * @throws \RuntimeException |
||
24 | * @throws \InvalidArgumentException |
||
25 | */ |
||
26 | 4 | public static function create(string $source, string $postfix = '.html'): string |
|
50 |