Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
22 | final class DisableTypoToleranceAttribute implements SettingContract |
||
23 | { |
||
24 | /** |
||
25 | * @var string[] |
||
26 | */ |
||
27 | private static $disableTypoToleranceOnAttributesKeys = [ |
||
28 | 'slug', |
||
29 | '*_slug', |
||
30 | 'slug_*', |
||
31 | '*code*', |
||
32 | '*sku*', |
||
33 | '*reference*', |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * Checks if the given key/value is a 'disableTypoToleranceOnAttributes'. |
||
38 | * |
||
39 | * @param string $key |
||
40 | * @param array|null|string $value |
||
41 | * @param array $disableTypoToleranceOnAttributes |
||
42 | * |
||
43 | * @return array |
||
44 | */ |
||
45 | 4 | public function getValue(string $key, $value, array $disableTypoToleranceOnAttributes): array |
|
54 |