| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class StarRatingDefaults extends Defaults |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | public $casts = [ |
||
| 14 | 'args' => 'array', |
||
| 15 | 'count' => 'int', |
||
| 16 | 'prefix' => 'string', |
||
| 17 | 'rating' => 'float', |
||
| 18 | ]; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @return array |
||
| 22 | */ |
||
| 23 | protected function defaults() |
||
| 24 | { |
||
| 25 | return [ |
||
| 26 | 'args' => [], |
||
| 27 | 'count' => 0, |
||
| 28 | 'prefix' => glsr()->isAdmin() ? '' : 'glsr-', |
||
| 29 | 'rating' => 0, |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Normalize provided values, this always runs first. |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | protected function normalize(array $values = []) |
||
| 41 | } |
||
| 42 | } |
||
| 43 |