| Conditions | 5 |
| Paths | 12 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | protected function blockStyleAttr(array $attributes): string |
||
| 24 | { |
||
| 25 | $attr = []; |
||
| 26 | if (!empty($attributes['styleRatingColor'])) { |
||
| 27 | $attr[] = "--glsr-review-star-bg: var(--wp--preset--color--{$attributes['styleRatingColor']});"; |
||
| 28 | } elseif (!empty($attributes['styleRatingColorCustom'])) { |
||
| 29 | $attr[] = "--glsr-review-star-bg: {$attributes['styleRatingColorCustom']};"; |
||
| 30 | } |
||
| 31 | if (!empty($attributes['styleStarSize'])) { |
||
| 32 | $attr[] = "--glsr-review-star: {$attributes['styleStarSize']};"; |
||
| 33 | } |
||
| 34 | if (!empty($attributes['styleReviewSpacing']['top'])) { |
||
| 35 | $attr[] = "--glsr-review-row-gap: {$attributes['styleReviewSpacing']['top']};"; |
||
| 36 | } |
||
| 37 | return implode('', $attr); |
||
| 38 | } |
||
| 40 |