| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class CustomRankingAttribute implements SettingContract |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var string[] |
||
| 23 | */ |
||
| 24 | private static $customRankingKeys = [ |
||
| 25 | '*ed_at', |
||
| 26 | 'count_*', |
||
| 27 | '*_count', |
||
| 28 | 'number_*', |
||
| 29 | '*_number', |
||
| 30 | ]; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Checks if the given key/value is a 'CustomRanking'. |
||
| 34 | * |
||
| 35 | * @param string $key |
||
| 36 | * @param array|null|string $value |
||
| 37 | * @param array $customRanking |
||
| 38 | * |
||
| 39 | * @return array |
||
| 40 | */ |
||
| 41 | 3 | public function getValue(string $key, $value, array $customRanking): array |
|
| 50 |