Passed
Push — dev ( ae494b...006fcc )
by Mattia
04:13
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 <=).
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
      */
134 134
     private function getFrontPoints($size = self::HEAD_BASE_SIZE): array
135 135
     {
136
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
137
-        $half_size = \round($size / 2);
136
+        $cosine_result = \round(self::COSINE_PI_6*$size);
137
+        $half_size = \round($size/2);
138 138
 
139 139
         return [
140 140
             0, 0, 0, 0,
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
      */
153 153
     private function getTopPoints($size = self::HEAD_BASE_SIZE)
154 154
     {
155
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
156
-        $half_size = \round($size / 2);
155
+        $cosine_result = \round(self::COSINE_PI_6*$size);
156
+        $half_size = \round($size/2);
157 157
 
158 158
         return [
159 159
             0, $size, 0, 0,
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
      */
172 172
     private function getRightPoints($size = self::HEAD_BASE_SIZE)
173 173
     {
174
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
175
-        $half_size = \round($size / 2);
174
+        $cosine_result = \round(self::COSINE_PI_6*$size);
175
+        $half_size = \round($size/2);
176 176
 
177 177
         return [
178 178
             $size, 0, 0, 0,
@@ -244,16 +244,16 @@  discard block
 block discarded – undo
244 244
         );
245 245
 
246 246
         // Head image
247
-        $doubleAvatarSize = self::HEAD_BASE_SIZE * 2;
248
-        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN * 2);
247
+        $doubleAvatarSize = self::HEAD_BASE_SIZE*2;
248
+        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN*2);
249 249
 
250 250
         $this->head = new \Imagick();
251 251
         $this->head->newImage($finalImageSize, $finalImageSize, $this->getImagickPixelTransparent());
252 252
 
253 253
         // This is weird, but it works
254
-        $faceX = ((int) \round(($doubleAvatarSize / 2))) - 2 + self::HEAD_MARGIN;
255
-        $faceY = $rightY = ((int) \round($doubleAvatarSize / 4)) - 1 + self::HEAD_MARGIN;
256
-        $topX = $rightX = ((int) \round($doubleAvatarSize / 16)) + self::HEAD_MARGIN;
254
+        $faceX = ((int) \round(($doubleAvatarSize/2))) - 2 + self::HEAD_MARGIN;
255
+        $faceY = $rightY = ((int) \round($doubleAvatarSize/4)) - 1 + self::HEAD_MARGIN;
256
+        $topX = $rightX = ((int) \round($doubleAvatarSize/16)) + self::HEAD_MARGIN;
257 257
         $topY = -1 + self::HEAD_MARGIN;
258 258
 
259 259
         // Add Face Section
Please login to merge, or discard this patch.