Passed
Pull Request — master (#11)
by
unknown
14:28 queued 10:41
created
app/Minecraft/MojangAccountFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         $cape = '';
43 43
 
44 44
         if (\array_key_exists('properties', $response)) {
45
-            $textures = \array_filter($response['properties'], static function ($entry) {
45
+            $textures = \array_filter($response['properties'], static function($entry) {
46 46
                 return $entry['name'] === 'textures';
47 47
             });
48 48
 
Please login to merge, or discard this patch.
app/Http/Middleware/CleanupUuidOrName.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             $route[2]['username'] = $this->cleanUsername($route[2]['username']);
22 22
         }
23 23
 
24
-        $request->setRouteResolver(static function () use ($route) {
24
+        $request->setRouteResolver(static function() use ($route) {
25 25
             return $route;
26 26
         });
27 27
 
Please login to merge, or discard this patch.
app/Http/Controllers/Api/IsometricAvatarController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function serveDefault($size = 0): Response
42 42
     {
43
-        $image = $this->cache()->remember('rendering.system.default_isometric_avatar', 3600, function () use ($size) {
43
+        $image = $this->cache()->remember('rendering.system.default_isometric_avatar', 3600, function() use ($size) {
44 44
             return (string) $this->rendering->isometricAvatar(null, (int) $size);
45 45
         });
46 46
 
Please login to merge, or discard this patch.
app/Http/Controllers/Api/AvatarController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function serveDefault($size = 0): Response
46 46
     {
47
-        $image = $this->cache()->remember('rendering.system.default_avatar', 3600, function () use ($size) {
47
+        $image = $this->cache()->remember('rendering.system.default_avatar', 3600, function() use ($size) {
48 48
             return (string) $this->rendering->avatar(
49 49
                 null,
50 50
                 (int) $size
Please login to merge, or discard this patch.
app/Minecraft/MojangClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
     private function sendApiRequest(string $method, string $url): ?array
89 89
     {
90 90
         try {
91
-            return \Cache::remember($this->getCacheKey($method, $url), self::CACHE_TTL, function () use ($method, $url) {
91
+            return \Cache::remember($this->getCacheKey($method, $url), self::CACHE_TTL, function() use ($method, $url) {
92 92
                 $response = $this->httpClient->request($method, $url);
93 93
                 // No Content
94 94
                 if ($response->getStatusCode() === 204) {
Please login to merge, or discard this patch.
app/Image/LayerValidator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
             ++$x;
63 63
         }
64 64
         // mean value for each color
65
-        $totalPixels = $side->getWidth() * $side->getHeight();
66
-        $meanRed = \array_sum($allRed) / $totalPixels;
67
-        $meanGreen = \array_sum($allGreen) / $totalPixels;
68
-        $meanBlue = \array_sum($allBlue) / $totalPixels;
69
-        $this->meanAlpha = (int) \round(\array_sum($allAlpha) / $totalPixels);
65
+        $totalPixels = $side->getWidth()*$side->getHeight();
66
+        $meanRed = \array_sum($allRed)/$totalPixels;
67
+        $meanGreen = \array_sum($allGreen)/$totalPixels;
68
+        $meanBlue = \array_sum($allBlue)/$totalPixels;
69
+        $this->meanAlpha = (int) \round(\array_sum($allAlpha)/$totalPixels);
70 70
         // Arrays deviation
71 71
         $devsRed = [];
72 72
         $devsGreen = [];
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
             ++$i;
80 80
         }
81 81
         // stddev for each color
82
-        $this->redStdDev = \sqrt(\array_sum($devsRed) / $totalPixels);
83
-        $this->greenStdDev = \sqrt(\array_sum($devsGreen) / $totalPixels);
84
-        $this->blueStdDev = \sqrt(\array_sum($devsBlue) / $totalPixels);
82
+        $this->redStdDev = \sqrt(\array_sum($devsRed)/$totalPixels);
83
+        $this->greenStdDev = \sqrt(\array_sum($devsGreen)/$totalPixels);
84
+        $this->blueStdDev = \sqrt(\array_sum($devsBlue)/$totalPixels);
85 85
     }
86 86
 
87 87
     /**
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 <=).
@@ -206,16 +206,16 @@  discard block
 block discarded – undo
206 206
         );
207 207
 
208 208
         // Head image
209
-        $doubleAvatarSize = self::HEAD_BASE_SIZE * 2;
210
-        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN * 2);
209
+        $doubleAvatarSize = self::HEAD_BASE_SIZE*2;
210
+        $finalImageSize = $doubleAvatarSize + (self::HEAD_MARGIN*2);
211 211
 
212 212
         $this->head = new \Imagick();
213 213
         $this->head->newImage($finalImageSize, $finalImageSize, $this->getImagickPixelTransparent());
214 214
 
215 215
         // This is weird, but it works
216
-        $faceX = ((int) \round(($doubleAvatarSize / 2))) - 2 + self::HEAD_MARGIN;
217
-        $faceY = $rightY = ((int) \round($doubleAvatarSize / 4)) - 1 + self::HEAD_MARGIN;
218
-        $topX = $rightX = ((int) \round($doubleAvatarSize / 16)) + self::HEAD_MARGIN;
216
+        $faceX = ((int) \round(($doubleAvatarSize/2))) - 2 + self::HEAD_MARGIN;
217
+        $faceY = $rightY = ((int) \round($doubleAvatarSize/4)) - 1 + self::HEAD_MARGIN;
218
+        $topX = $rightX = ((int) \round($doubleAvatarSize/16)) + self::HEAD_MARGIN;
219 219
         $topY = -1 + self::HEAD_MARGIN;
220 220
 
221 221
         // Add Face Section
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
      */
270 270
     private function getFrontPoints($size = self::HEAD_BASE_SIZE): array
271 271
     {
272
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
273
-        $half_size = \round($size / 2);
272
+        $cosine_result = \round(self::COSINE_PI_6*$size);
273
+        $half_size = \round($size/2);
274 274
 
275 275
         return [
276 276
             0, 0, 0, 0,
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
      */
289 289
     private function getTopPoints($size = self::HEAD_BASE_SIZE): array
290 290
     {
291
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
292
-        $half_size = \round($size / 2);
291
+        $cosine_result = \round(self::COSINE_PI_6*$size);
292
+        $half_size = \round($size/2);
293 293
 
294 294
         return [
295 295
             0, $size, 0, 0,
@@ -307,8 +307,8 @@  discard block
 block discarded – undo
307 307
      */
308 308
     private function getRightPoints($size = self::HEAD_BASE_SIZE): array
309 309
     {
310
-        $cosine_result = \round(self::COSINE_PI_6 * $size);
311
-        $half_size = \round($size / 2);
310
+        $cosine_result = \round(self::COSINE_PI_6*$size);
311
+        $half_size = \round($size/2);
312 312
 
313 313
         return [
314 314
             $size, 0, 0, 0,
Please login to merge, or discard this patch.
app/Image/Sections/BaseSkinSection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
 
33 33
         $this->patchOldSkin($tmpImageResource);
34 34
 
35
-        $scale = $skinHeight / $this->baseImageHeight;
35
+        $scale = $skinHeight/$this->baseImageHeight;
36 36
         if ($scale === 0) {
37 37
             $scale = 1;
38 38
         }
39
-        $skinWidth = (int) \round($scale * ($this->baseImageWidth));
39
+        $skinWidth = (int) \round($scale*($this->baseImageWidth));
40 40
 
41 41
         $this->imgResource = $this->emptyBaseImage($skinWidth, $skinHeight);
42 42
         \imagecopyresized($this->imgResource, $tmpImageResource, 0, 0, 0, 0, $skinWidth, $skinHeight, $this->baseImageWidth, $this->baseImageHeight);
Please login to merge, or discard this patch.
app/Image/Components/Coordinates.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public const HEAD = [
15 15
         Side::TOP => [[8, 0], [16, 8]],
16 16
         Side::BOTTOM => [[16, 0], [24, 8]],
17
-        Side::FRONT => [[8, 8],  [16, 16]],
17
+        Side::FRONT => [[8, 8], [16, 16]],
18 18
         Side::BACK => [[24, 8], [32, 16]],
19 19
         Side::RIGHT => [[0, 8], [8, 16]],
20 20
         Side::LEFT => [[16, 8], [24, 16]],
Please login to merge, or discard this patch.