Skip to content

Commit abf5575

Browse files
author
Jakub Caban
committed
Code style
1 parent e819e0c commit abf5575

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Font.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public function applyToImage(Image $image, $posx = 0, $posy = 0)
8181
switch ($align.'-'.$valign) {
8282

8383
case 'center-top':
84-
$posx -= round(($box[6] + $box[4])/2);
85-
$posy -= round(($box[7] + $box[5])/2);
84+
$posx -= round(($box[6] + $box[4]) / 2);
85+
$posy -= round(($box[7] + $box[5]) / 2);
8686
break;
8787

8888
case 'right-top':
@@ -97,25 +97,25 @@ public function applyToImage(Image $image, $posx = 0, $posy = 0)
9797

9898
case 'center-center':
9999
case 'center-middle':
100-
$posx -= round(($box[0] + $box[4])/2);
101-
$posy -= round(($box[1] + $box[5])/2);
100+
$posx -= round(($box[0] + $box[4]) / 2);
101+
$posy -= round(($box[1] + $box[5]) / 2);
102102
break;
103103

104104
case 'right-center':
105105
case 'right-middle':
106-
$posx -= round(($box[2] + $box[4])/2);
107-
$posy -= round(($box[3] + $box[5])/2);
106+
$posx -= round(($box[2] + $box[4]) / 2);
107+
$posy -= round(($box[3] + $box[5]) / 2);
108108
break;
109109

110110
case 'left-center':
111111
case 'left-middle':
112-
$posx -= round(($box[0] + $box[6])/2);
113-
$posy -= round(($box[1] + $box[7])/2);
112+
$posx -= round(($box[0] + $box[6]) / 2);
113+
$posy -= round(($box[1] + $box[7]) / 2);
114114
break;
115115

116116
case 'center-bottom':
117-
$posx -= round(($box[0] + $box[2])/2);
118-
$posy -= round(($box[1] + $box[3])/2);
117+
$posx -= round(($box[0] + $box[2]) / 2);
118+
$posy -= round(($box[1] + $box[3]) / 2);
119119
break;
120120

121121
case 'right-bottom':
@@ -169,19 +169,19 @@ public function getBoxSize()
169169
$box = [
170170
$core->xoffset,
171171
$core->height,
172-
$core->width+$core->xoffset,
172+
$core->width + $core->xoffset,
173173
$core->height,
174-
$core->width+$core->xoffset,
174+
$core->width + $core->xoffset,
175175
0,
176176
$core->xoffset,
177-
0
177+
0,
178178
];
179179

180180
if ($this->angle !== 0) {
181181

182182
$angle = deg2rad(360 - $this->angle);
183183

184-
for ($i=0; $i<4; $i++) {
184+
for ($i = 0; $i < 4; $i++) {
185185
$x = $box[$i * 2];
186186
$y = $box[$i * 2 + 1];
187187
$box[$i * 2] = cos($angle) * $x - sin($angle) * $y;

0 commit comments

Comments
 (0)