Total Complexity | 5 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
19 | class searchableAttribute implements SettingContract |
||
20 | { |
||
21 | /** |
||
22 | * @var string[] |
||
23 | */ |
||
24 | private static $unsearchableAttributesKeys = [ |
||
25 | 'id', |
||
26 | '*_id', |
||
27 | 'id_*', |
||
28 | '*ed_at', |
||
29 | '*_count', |
||
30 | 'count_*', |
||
31 | 'number_*', |
||
32 | '*_number', |
||
33 | '*image*', |
||
34 | '*url*', |
||
35 | '*link*', |
||
36 | '*password*', |
||
37 | '*token*', |
||
38 | '*hash*', |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * @var string[] |
||
43 | */ |
||
44 | private static $unsearchableAttributesValues = [ |
||
45 | 'http://*', |
||
46 | 'https://*', |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * Checks if the given key/value is a 'searchableAttributes'. |
||
51 | * |
||
52 | * @param string $key |
||
53 | * @param array|null|string $value |
||
54 | * @param array $searchableAttributes |
||
55 | * |
||
56 | * @return array |
||
57 | */ |
||
58 | 3 | public function getValue(string $key, $value, array $searchableAttributes): array |
|
69 |