@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public static function getLeftCoord($coords, $limit = 1) |
41 | 41 | { |
42 | 42 | $c = $coords; |
43 | - usort($c, function (Coordinate $coordA, Coordinate $coordB) { |
|
43 | + usort($c, function(Coordinate $coordA, Coordinate $coordB) { |
|
44 | 44 | if ($coordA->getX() == $coordB->getX()) { |
45 | 45 | return 0; |
46 | 46 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | public static function getTopCoord($coords, $limit = 1) |
60 | 60 | { |
61 | 61 | $c = $coords; |
62 | - usort($c, function (Coordinate $coordA, Coordinate $coordB) { |
|
62 | + usort($c, function(Coordinate $coordA, Coordinate $coordB) { |
|
63 | 63 | if ($coordA->getY() === $coordB->getY()) { |
64 | 64 | return 0; |
65 | 65 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | public static function getRightCoord($coords, $limit = 1) |
79 | 79 | { |
80 | 80 | $c = $coords; |
81 | - usort($c, function (Coordinate $coordA, Coordinate $coordB) { |
|
81 | + usort($c, function(Coordinate $coordA, Coordinate $coordB) { |
|
82 | 82 | if ($coordA->getX() === $coordB->getX()) { |
83 | 83 | return 0; |
84 | 84 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | public static function getBottomCoord($coords, $limit = 1) |
98 | 98 | { |
99 | 99 | $c = $coords; |
100 | - usort($c, function (Coordinate $coordA, Coordinate $coordB) { |
|
100 | + usort($c, function(Coordinate $coordA, Coordinate $coordB) { |
|
101 | 101 | if ($coordA->getY() === $coordB->getY()) { |
102 | 102 | return 0; |
103 | 103 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | $finalSize = 1; |
63 | - for ($i = 1;$i <= 1000;$i = $i + 0.5) { |
|
63 | + for ($i = 1; $i <= 1000; $i = $i + 0.5) { |
|
64 | 64 | $textbox = imageftbbox(round($this->fontToPixel($i)), 0, (string) $this->getFont(), $this->getText()); |
65 | 65 | |
66 | 66 | $height = $textbox[1] + abs($textbox[7]); |
@@ -193,8 +193,8 @@ |
||
193 | 193 | $latitude = $lat_direction * ($lat_degrees + ($lat_minutes / 60) + ($lat_seconds / (60 * 60))); |
194 | 194 | $longitude = $lon_direction * ($lon_degrees + ($lon_minutes / 60) + ($lon_seconds / (60 * 60))); |
195 | 195 | |
196 | - $latitude_deg = sprintf('%s°%s\'%s" %s', $lat_degrees, $lat_minutes, $lat_seconds, $lat_direction == 1 ? 'N':'S'); |
|
197 | - $longitude_deg = sprintf('%s°%s\'%s" %s', $lon_degrees, $lon_minutes, $lon_seconds, $lon_direction == 1 ? 'E':'W'); |
|
196 | + $latitude_deg = sprintf('%s°%s\'%s" %s', $lat_degrees, $lat_minutes, $lat_seconds, $lat_direction == 1 ? 'N' : 'S'); |
|
197 | + $longitude_deg = sprintf('%s°%s\'%s" %s', $lon_degrees, $lon_minutes, $lon_seconds, $lon_direction == 1 ? 'E' : 'W'); |
|
198 | 198 | |
199 | 199 | return [ |
200 | 200 | 'lat' => $latitude, |
@@ -33,7 +33,7 @@ |
||
33 | 33 | /** @var BorderCommandOption $options */ |
34 | 34 | $options = $this->options; |
35 | 35 | |
36 | - for ($i = 0;$i < $options->getStroke();$i++) { |
|
36 | + for ($i = 0; $i < $options->getStroke(); $i++) { |
|
37 | 37 | $builder = new ImageBuilder($image); |
38 | 38 | |
39 | 39 | $builder->addCommand( |
@@ -34,8 +34,8 @@ |
||
34 | 34 | $resource = $image->getResource(); |
35 | 35 | |
36 | 36 | // start from the top-left pixel and keep looping until we have the desired effect |
37 | - for ($y = 0;$y < $image->getHeight();$y += $level + 1) { |
|
38 | - for ($x = 0;$x < $image->getWidth();$x += $level + 1) { |
|
37 | + for ($y = 0; $y < $image->getHeight(); $y += $level + 1) { |
|
38 | + for ($x = 0; $x < $image->getWidth(); $x += $level + 1) { |
|
39 | 39 | // get the color for current pixel |
40 | 40 | $rgb = imagecolorsforindex($resource, imagecolorat($resource, $x, $y)); |
41 | 41 |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | $luminance = 0; |
137 | - for ($x = 1;$x <= $samples;$x++) { |
|
138 | - for ($y = 1;$y <= $samples;$y++) { |
|
137 | + for ($x = 1; $x <= $samples; $x++) { |
|
138 | + for ($y = 1; $y <= $samples; $y++) { |
|
139 | 139 | $coordX = round($portion->getWidth() / $samples * $x) - ($portion->getWidth() / $samples / 2); |
140 | 140 | $cooordY = round($portion->getHeight() / $samples * $y) - ($portion->getHeight() / $samples / 2); |
141 | 141 | $rgb = imagecolorat($portion->getResource(), $coordX, $cooordY); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * @return bool|ImageResponse |
206 | 206 | * @throws Exception |
207 | 207 | */ |
208 | - public function toWebP($filePathName = null){ |
|
208 | + public function toWebP($filePathName = null) { |
|
209 | 209 | return ImageWriter::toWebP($this->getResource(), $filePathName); |
210 | 210 | } |
211 | 211 |