Passed
Push — dev ( 077822...7dfc6a )
by Mattia
04:17
created
app/Image/IsometricAvatar.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * Cosine PI/6.
19 19
      */
20
-    private const COSINE_PI_6 = M_SQRT3 / 2;
20
+    private const COSINE_PI_6 = M_SQRT3/2;
21 21
 
22 22
     /**
23 23
      * Base size (all requests must be <=).
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
      */
137 137
     private function getFrontPoints($size = self::HEAD_BASE_SIZE): array
138 138
     {
139
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
140
-        $half_size = \round($size / 2);
139
+        $cosine_result = \round(self::COSINE_PI_6*$size);
140
+        $half_size = \round($size/2);
141 141
 
142 142
         return [
143 143
             0, 0, 0, 0,
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
      */
156 156
     private function getTopPoints($size = self::HEAD_BASE_SIZE): array
157 157
     {
158
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
159
-        $half_size = \round($size / 2);
158
+        $cosine_result = \round(self::COSINE_PI_6*$size);
159
+        $half_size = \round($size/2);
160 160
 
161 161
         return [
162 162
             0, $size, 0, 0,
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
      */
175 175
     private function getRightPoints($size = self::HEAD_BASE_SIZE): array
176 176
     {
177
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
178
-        $half_size = \round($size / 2);
177
+        $cosine_result = \round(self::COSINE_PI_6*$size);
178
+        $half_size = \round($size/2);
179 179
 
180 180
         return [
181 181
             $size, 0, 0, 0,
@@ -247,16 +247,16 @@  discard block
 block discarded – undo
247 247
         );
248 248
 
249 249
         // Head image
250
-        $doubleAvatarSize = self::HEAD_BASE_SIZE * 2;
251
-        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN * 2);
250
+        $doubleAvatarSize = self::HEAD_BASE_SIZE*2;
251
+        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN*2);
252 252
 
253 253
         $this->head = new \Imagick();
254 254
         $this->head->newImage($finalImageSize, $finalImageSize, $this->getImagickPixelTransparent());
255 255
 
256 256
         // This is weird, but it works
257
-        $faceX = ((int) \round(($doubleAvatarSize / 2))) - 2 + self::HEAD_MARGIN;
258
-        $faceY = $rightY = ((int) \round($doubleAvatarSize / 4)) - 1 + self::HEAD_MARGIN;
259
-        $topX = $rightX = ((int) \round($doubleAvatarSize / 16)) + self::HEAD_MARGIN;
257
+        $faceX = ((int) \round(($doubleAvatarSize/2))) - 2 + self::HEAD_MARGIN;
258
+        $faceY = $rightY = ((int) \round($doubleAvatarSize/4)) - 1 + self::HEAD_MARGIN;
259
+        $topX = $rightX = ((int) \round($doubleAvatarSize/16)) + self::HEAD_MARGIN;
260 260
         $topY = -1 + self::HEAD_MARGIN;
261 261
 
262 262
         // Add Face Section
Please login to merge, or discard this patch.