Conditions | 6 |
Paths | 16 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | function execute($image, $request) |
||
22 | { |
||
23 | $color = $this->fields['color']->value; |
||
24 | $radius = $this->fields['radius']->value; |
||
25 | $smoothness = $this->fields['smoothness']->value; |
||
26 | |||
27 | $corners = 0; |
||
28 | if ($this->fval('top-left')) |
||
29 | $corners += \WideImage\WideImage::SIDE_TOP_LEFT; |
||
30 | |||
31 | if ($this->fval('top-right')) |
||
32 | $corners += \WideImage\WideImage::SIDE_TOP_RIGHT; |
||
33 | |||
34 | if ($this->fval('bottom-right')) |
||
35 | $corners += \WideImage\WideImage::SIDE_BOTTOM_RIGHT; |
||
36 | |||
37 | if ($this->fval('bottom-left')) |
||
38 | $corners += \WideImage\WideImage::SIDE_BOTTOM_LEFT; |
||
39 | |||
40 | return $image->roundCorners($radius, $color ? hexdec($color) : null, $smoothness, $corners); |
||
41 | } |
||
43 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.