Passed
Push — master ( 2405d0...6f7c46 )
by Mattia
03:35
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.
app/Image/Sections/Avatar.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
             ++$x;
74 74
         }
75 75
         // mean value for each color
76
-        $meanRed = \array_sum($allRed) / 64;
77
-        $meanGreen = \array_sum($allGreen) / 64;
78
-        $meanBlue = \array_sum($allBlue) / 64;
79
-        $this->meanAlpha = (int) \round(\array_sum($allAlpha) / 64);
76
+        $meanRed = \array_sum($allRed)/64;
77
+        $meanGreen = \array_sum($allGreen)/64;
78
+        $meanBlue = \array_sum($allBlue)/64;
79
+        $this->meanAlpha = (int) \round(\array_sum($allAlpha)/64);
80 80
         // Arrays deviation
81 81
         $devsRed = [];
82 82
         $devsGreen = [];
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
             ++$i;
90 90
         }
91 91
         // stddev for each color
92
-        $this->redStdDev = \sqrt(\array_sum($devsRed) / 64);
93
-        $this->greenStdDev = \sqrt(\array_sum($devsGreen) / 64);
94
-        $this->blueStdDev = \sqrt(\array_sum($devsBlue) / 64);
92
+        $this->redStdDev = \sqrt(\array_sum($devsRed)/64);
93
+        $this->greenStdDev = \sqrt(\array_sum($devsGreen)/64);
94
+        $this->blueStdDev = \sqrt(\array_sum($devsBlue)/64);
95 95
     }
96 96
 
97 97
     /**
Please login to merge, or discard this patch.
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/DownloadTextureController.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
         $this->uuidResolver->resolve($uuid);
58 58
 
59 59
         $skinPath = $this->uuidResolver->resolve($uuid) ?
60
-            SkinsStorage::getPath($this->uuidResolver->getUuid()) :
61
-            SkinsStorage::getPath(MinecraftDefaults::STEVE_DEFAULT_SKIN_NAME);
60
+            SkinsStorage::getPath($this->uuidResolver->getUuid()) : SkinsStorage::getPath(MinecraftDefaults::STEVE_DEFAULT_SKIN_NAME);
62 61
 
63 62
         $userSkin = new Skin($skinPath);
64 63
         $userSkin->prepareTextureDownload();
Please login to merge, or discard this patch.
app/Transformers/Account/AccountBasicDataTransformer.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
             'username' => $account->username,
18 18
             'count_request' => $account->stats->count_request,
19 19
             'last_request' => $account->stats->request_at ?
20
-                $account->stats->request_at->format(Carbon::ATOM) :
21
-                null,
20
+                $account->stats->request_at->format(Carbon::ATOM) : null,
22 21
         ];
23 22
     }
24 23
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/SkinBackController.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_skin_back', 3600, function () use ($size) {
43
+        $image = $this->cache()->remember('rendering.system.default_skin_back', 3600, function() use ($size) {
44 44
             return (string) $this->rendering->skin(
45 45
                 null,
46 46
                 (int) $size,
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.