Passed
Pull Request — master (#21)
by Mattia
06:08
created
app/Image/Sections/BaseSkinSection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@
 block discarded – undo
35 35
 
36 36
         $this->patchOldSkin($tmpImageResource);
37 37
 
38
-        $scale = $skinHeight / $this->baseImageHeight;
38
+        $scale = $skinHeight/$this->baseImageHeight;
39 39
         if ($scale === 0) {
40 40
             $scale = 1;
41 41
         }
42
-        $skinWidth = (int) round($scale * $this->baseImageWidth);
42
+        $skinWidth = (int) round($scale*$this->baseImageWidth);
43 43
 
44 44
         $this->imgResource = $this->emptyBaseImage($skinWidth, $skinHeight);
45 45
         imagecopyresized($this->imgResource, $tmpImageResource, 0, 0, 0, 0, $skinWidth, $skinHeight, $this->baseImageWidth, $this->baseImageHeight);
Please login to merge, or discard this patch.
app/Image/IsometricAvatar.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * Cosine PI/6.
17 17
      */
18
-    private const COSINE_PI_6 = \M_SQRT3 / 2;
18
+    private const COSINE_PI_6 = \M_SQRT3/2;
19 19
 
20 20
     /**
21 21
      * Base size (all requests must be <=).
@@ -188,16 +188,16 @@  discard block
 block discarded – undo
188 188
         );
189 189
 
190 190
         // Head image
191
-        $doubleAvatarSize = self::HEAD_BASE_SIZE * 2;
192
-        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN * 2);
191
+        $doubleAvatarSize = self::HEAD_BASE_SIZE*2;
192
+        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN*2);
193 193
 
194 194
         $this->head = new \Imagick();
195 195
         $this->head->newImage($finalImageSize, $finalImageSize, $this->getImagickPixelTransparent());
196 196
 
197 197
         // This is weird, but it works
198
-        $faceX = ((int) round($doubleAvatarSize / 2)) - 2 + self::HEAD_MARGIN;
199
-        $faceY = $rightY = ((int) round($doubleAvatarSize / 4)) - 1 + self::HEAD_MARGIN;
200
-        $topX = $rightX = ((int) round($doubleAvatarSize / 16)) + self::HEAD_MARGIN;
198
+        $faceX = ((int) round($doubleAvatarSize/2)) - 2 + self::HEAD_MARGIN;
199
+        $faceY = $rightY = ((int) round($doubleAvatarSize/4)) - 1 + self::HEAD_MARGIN;
200
+        $topX = $rightX = ((int) round($doubleAvatarSize/16)) + self::HEAD_MARGIN;
201 201
         $topY = -1 + self::HEAD_MARGIN;
202 202
 
203 203
         // Add Face Section
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
      */
250 250
     private function getFrontPoints($size = self::HEAD_BASE_SIZE): array
251 251
     {
252
-        $cosine_result = round(self::COSINE_PI_6 * $size);
253
-        $half_size = round($size / 2);
252
+        $cosine_result = round(self::COSINE_PI_6*$size);
253
+        $half_size = round($size/2);
254 254
 
255 255
         return [
256 256
             0, 0, 0, 0,
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
      */
267 267
     private function getTopPoints($size = self::HEAD_BASE_SIZE): array
268 268
     {
269
-        $cosine_result = round(self::COSINE_PI_6 * $size);
270
-        $half_size = round($size / 2);
269
+        $cosine_result = round(self::COSINE_PI_6*$size);
270
+        $half_size = round($size/2);
271 271
 
272 272
         return [
273 273
             0, $size, 0, 0,
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
      */
284 284
     private function getRightPoints($size = self::HEAD_BASE_SIZE): array
285 285
     {
286
-        $cosine_result = round(self::COSINE_PI_6 * $size);
287
-        $half_size = round($size / 2);
286
+        $cosine_result = round(self::COSINE_PI_6*$size);
287
+        $half_size = round($size/2);
288 288
 
289 289
         return [
290 290
             $size, 0, 0, 0,
Please login to merge, or discard this patch.
app/Http/Controllers/Api/DownloadTextureController.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@
 block discarded – undo
35 35
         ];
36 36
 
37 37
         $skinPath = $this->uuidResolver->resolve($uuid) ?
38
-            SkinsStorage::getPath($this->uuidResolver->getUuid()) :
39
-            SkinsStorage::getPath(MinecraftDefaults::STEVE_DEFAULT_SKIN_NAME);
38
+            SkinsStorage::getPath($this->uuidResolver->getUuid()) : SkinsStorage::getPath(MinecraftDefaults::STEVE_DEFAULT_SKIN_NAME);
40 39
 
41 40
         $rawSkin = new Raw($skinPath);
42 41
         $rawSkin->render();
Please login to merge, or discard this patch.