Total Complexity | 4 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class SluggerFilter implements FilterInterface |
||
14 | { |
||
15 | private Slugger\SluggerInterface $slugger; |
||
16 | |||
17 | 9 | public function __construct(?Slugger\SluggerInterface $slugger = null) |
|
18 | { |
||
19 | 9 | $this->slugger = $slugger ?: new Slugger\AsciiSlugger(); |
|
20 | } |
||
21 | |||
22 | /** |
||
23 | * Returns the result of filtering $value |
||
24 | * |
||
25 | * @param mixed $value |
||
26 | * @throws Exception\RuntimeException If filtering $value is impossible |
||
27 | * @return mixed |
||
28 | */ |
||
29 | 9 | public function filter($value) |
|
32 | } |
||
33 | } |
||
34 |