| Total Complexity | 4 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class SluggerFilter implements FilterInterface |
||
| 11 | { |
||
| 12 | /** @var Slugify\SlugifyInterface */ |
||
| 13 | private $slugger; |
||
| 14 | |||
| 15 | 15 | public function __construct(?Slugify\SlugifyInterface $slugger = null) |
|
| 16 | { |
||
| 17 | 15 | $this->slugger = $slugger ?: new Slugify\Slugify(['lowercase' => false]); |
|
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns the result of filtering $value |
||
| 22 | * |
||
| 23 | * @param mixed $value |
||
| 24 | * @throws Exception\RuntimeException If filtering $value is impossible |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | 13 | public function filter($value) |
|
| 30 | } |
||
| 31 | } |
||
| 32 |