Completed
Push — development ( 3da724...5b8e45 )
by Claudio
05:15
created
app/Http/Controllers/ArticleController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     protected function category(string $countryId, ArticleCategory $category, int $categoryPage, int $start): Response
57 57
     {
58
-        $articles = Article::where('id', '>=', $start)->limit(10)->orderBy('id', 'DESC')->get()->filter(function ($item) use ($category) {
58
+        $articles = Article::where('id', '>=', $start)->limit(10)->orderBy('id', 'DESC')->get()->filter(function($item) use ($category) {
59 59
             return $category->name == 'all' || in_array($category, $item->categories);
60 60
         });
61 61
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             return response()->json(null, 404);
81 81
         }
82 82
 
83
-        $related = ($latest = Article::all())->filter(function ($item) use ($article) {
83
+        $related = ($latest = Article::all())->filter(function($item) use ($article) {
84 84
             return in_array($article->categories[0], $item->categories);
85 85
         });
86 86
 
Please login to merge, or discard this patch.
app/Http/Controllers/ImagingController.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function getUserHead(Request $request)
27 27
     {
28
-        return redirect(Config::get('chocolatey.imaging').'avatarimage?figure='.($request->has('figure') ? $request->input('figure') :
29
-                User::where('username', $request->input('user'))->first()->figureString).'&size=l&headonly=1');
28
+        return redirect(Config::get('chocolatey.imaging') . 'avatarimage?figure=' . ($request->has('figure') ? $request->input('figure') : User::where('username', $request->input('user'))->first()->figureString) . '&size=l&headonly=1');
30 29
     }
31 30
 
32 31
     /**
@@ -39,7 +38,7 @@  discard block
 block discarded – undo
39 38
      */
40 39
     public function getUserBody(string $figure)
41 40
     {
42
-        return redirect(Config::get('chocolatey.imaging')."avatar/{$figure}");
41
+        return redirect(Config::get('chocolatey.imaging') . "avatar/{$figure}");
43 42
     }
44 43
 
45 44
     /**
Please login to merge, or discard this patch.
app/Helpers/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
      */
123 123
     public function hasSession()
124 124
     {
125
-        return (bool) Session::get(Config::get('chocolatey.security.session'));
125
+        return (bool)Session::get(Config::get('chocolatey.security.session'));
126 126
     }
127 127
 
128 128
     /**
Please login to merge, or discard this patch.
app/Models/FlatCat.php 1 patch
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class FlatCat.
7 7
  */
8
-class FlatCat extends ChocolateyModel
9
-{
10
-    /**
8
+ class FlatCat extends ChocolateyModel
9
+ {
10
+     /**
11 11
      * Disable Timestamps.
12 12
      *
13 13
      * @var bool
14 14
      */
15
-    public $timestamps = false;
15
+     public $timestamps = false;
16 16
 
17
-    /**
17
+     /**
18 18
      * The table associated with the model.
19 19
      *
20 20
      * @var string
21 21
      */
22
-    protected $table = 'navigator_flatcats';
22
+     protected $table = 'navigator_flatcats';
23 23
 
24
-    /**
24
+     /**
25 25
      * Primary Key of the Table.
26 26
      *
27 27
      * @var string
28 28
      */
29
-    protected $primaryKey = 'id';
29
+     protected $primaryKey = 'id';
30 30
 }
Please login to merge, or discard this patch.
app/Models/ShopInventory.php 1 patch
Switch Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,85 +1,85 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class ShopInventory.
7 7
  */
8
-class ShopInventory
9
-{
10
-    /**
8
+ class ShopInventory
9
+ {
10
+     /**
11 11
      * Payment Categories of the Country.
12 12
      *
13 13
      * @var PaymentCategory[]
14 14
      */
15
-    public $paymentCategories = [];
15
+     public $paymentCategories = [];
16 16
 
17
-    /**
17
+     /**
18 18
      * Inventory Items.
19 19
      *
20 20
      * @var array
21 21
      */
22
-    public $pricePoints = [];
22
+     public $pricePoints = [];
23 23
 
24
-    /**
24
+     /**
25 25
      * If double Credits are Enabled.
26 26
      *
27 27
      * @var bool
28 28
      */
29
-    public $doubleCredits = false;
29
+     public $doubleCredits = false;
30 30
 
31
-    /**
31
+     /**
32 32
      * Country Meta Data.
33 33
      *
34 34
      * @var Country
35 35
      */
36
-    public $country = null;
36
+     public $country = null;
37 37
 
38
-    /**
38
+     /**
39 39
      * Create a Shop Inventory.
40 40
      *
41 41
      * @param Country $country
42 42
      */
43
-    public function __construct(Country $country)
44
-    {
45
-        $this->setCountry($country);
46
-        $this->setPaymentCategories($country->countryCode);
47
-        $this->setPricePoints($country->countryCode);
48
-    }
43
+     public function __construct(Country $country)
44
+     {
45
+         $this->setCountry($country);
46
+         $this->setPaymentCategories($country->countryCode);
47
+         $this->setPricePoints($country->countryCode);
48
+     }
49 49
 
50
-    /**
50
+     /**
51 51
      * Set the Country Metadata.
52 52
      *
53 53
      * @param Country $country
54 54
      */
55
-    public function setCountry(Country $country)
56
-    {
57
-        $this->country = $country;
58
-    }
55
+     public function setCountry(Country $country)
56
+     {
57
+         $this->country = $country;
58
+     }
59 59
 
60
-    /**
60
+     /**
61 61
      * Set the Payment Methods.
62 62
      *
63 63
      * @param string $countryCode
64 64
      */
65
-    public function setPaymentCategories(string $countryCode)
66
-    {
67
-        $paymentMethods = [];
65
+     public function setPaymentCategories(string $countryCode)
66
+     {
67
+         $paymentMethods = [];
68 68
 
69
-        foreach (PaymentCategory::where('country_code', $countryCode)->get(['payment_type']) as $paymentMethod) {
70
-            $paymentMethods[] = $paymentMethod->payment_type;
71
-        }
69
+         foreach (PaymentCategory::where('country_code', $countryCode)->get(['payment_type']) as $paymentMethod) {
70
+             $paymentMethods[] = $paymentMethod->payment_type;
71
+         }
72 72
 
73
-        $this->paymentCategories = $paymentMethods;
74
-    }
73
+         $this->paymentCategories = $paymentMethods;
74
+     }
75 75
 
76
-    /**
76
+     /**
77 77
      * Get All Shop Items from this Country Code.
78 78
      *
79 79
      * @param string $countryCode
80 80
      */
81
-    public function setPricePoints(string $countryCode)
82
-    {
83
-        $this->pricePoints = ShopItem::where('countryCode', $countryCode)->get();
84
-    }
81
+     public function setPricePoints(string $countryCode)
82
+     {
83
+         $this->pricePoints = ShopItem::where('countryCode', $countryCode)->get();
84
+     }
85 85
 }
Please login to merge, or discard this patch.
app/Models/UserProfile.php 1 patch
Switch Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,109 +1,109 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class UserProfile.
7 7
  */
8
-class UserProfile
9
-{
10
-    /**
8
+ class UserProfile
9
+ {
10
+     /**
11 11
      * User Data.
12 12
      *
13 13
      * @var User
14 14
      */
15
-    public $user;
15
+     public $user;
16 16
 
17
-    /**
17
+     /**
18 18
      * User Friends.
19 19
      *
20 20
      * @var UserFriend[]|array
21 21
      */
22
-    public $friends = [];
22
+     public $friends = [];
23 23
 
24
-    /**
24
+     /**
25 25
      * User Badges.
26 26
      *
27 27
      * @var UserBadge[]|array
28 28
      */
29
-    public $badges = [];
29
+     public $badges = [];
30 30
 
31
-    /**
31
+     /**
32 32
      * User Groups.
33 33
      *
34 34
      * @var UserGroup[]|array
35 35
      */
36
-    public $groups = [];
36
+     public $groups = [];
37 37
 
38
-    /**
38
+     /**
39 39
      * User Rooms.
40 40
      *
41 41
      * @var Room[]|array
42 42
      */
43
-    public $rooms = [];
43
+     public $rooms = [];
44 44
 
45
-    /**
45
+     /**
46 46
      * UserProfile constructor.
47 47
      *
48 48
      * @param User $userData
49 49
      *
50 50
      * @return UserProfile
51 51
      */
52
-    public function __construct(User $userData)
53
-    {
54
-        $this->setUser($userData);
52
+     public function __construct(User $userData)
53
+     {
54
+         $this->setUser($userData);
55 55
 
56
-        $this->setFriends();
57
-        $this->setBadges();
58
-        $this->setGroups();
59
-        $this->setRooms();
56
+         $this->setFriends();
57
+         $this->setBadges();
58
+         $this->setGroups();
59
+         $this->setRooms();
60 60
 
61
-        return $this;
62
-    }
61
+         return $this;
62
+     }
63 63
 
64
-    /**
64
+     /**
65 65
      * Set User Data.
66 66
      *
67 67
      * @param User $userData
68 68
      */
69
-    protected function setUser(User $userData)
70
-    {
71
-        $this->user = $userData;
72
-    }
69
+     protected function setUser(User $userData)
70
+     {
71
+         $this->user = $userData;
72
+     }
73 73
 
74
-    /**
74
+     /**
75 75
      * Set User Friends.
76 76
      */
77
-    protected function setFriends()
78
-    {
79
-        $this->friends = UserFriend::where('user_one_id', $this->user->uniqueId)->get() ?? [];
80
-    }
77
+     protected function setFriends()
78
+     {
79
+         $this->friends = UserFriend::where('user_one_id', $this->user->uniqueId)->get() ?? [];
80
+     }
81 81
 
82
-    /**
82
+     /**
83 83
      * Set User Badges.
84 84
      */
85
-    protected function setBadges()
86
-    {
87
-        $this->badges = UserBadge::where('user_id', $this->user->uniqueId)->get() ?? [];
88
-    }
85
+     protected function setBadges()
86
+     {
87
+         $this->badges = UserBadge::where('user_id', $this->user->uniqueId)->get() ?? [];
88
+     }
89 89
 
90
-    /**
90
+     /**
91 91
      * Set User Groups.
92 92
      */
93
-    protected function setGroups()
94
-    {
95
-        $groups = GroupMember::where('user_id', $this->user->uniqueId)->get() ?? [];
93
+     protected function setGroups()
94
+     {
95
+         $groups = GroupMember::where('user_id', $this->user->uniqueId)->get() ?? [];
96 96
 
97
-        foreach ($groups as $group) {
98
-            $this->groups[] = $group->guild;
99
-        }
100
-    }
97
+         foreach ($groups as $group) {
98
+             $this->groups[] = $group->guild;
99
+         }
100
+     }
101 101
 
102
-    /**
102
+     /**
103 103
      * Set User Rooms.
104 104
      */
105
-    public function setRooms()
106
-    {
107
-        $this->rooms = Room::where('owner_id', $this->user->uniqueId)->where('state', '!=', 'invisible')->get() ?? [];
108
-    }
105
+     public function setRooms()
106
+     {
107
+         $this->rooms = Room::where('owner_id', $this->user->uniqueId)->where('state', '!=', 'invisible')->get() ?? [];
108
+     }
109 109
 }
Please login to merge, or discard this patch.
app/Models/Purse.php 1 patch
Switch Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,61 +1,61 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class Purse.
7 7
  */
8
-class Purse
9
-{
10
-    /**
8
+ class Purse
9
+ {
10
+     /**
11 11
      * User Credits Balance.
12 12
      *
13 13
      * @var int
14 14
      */
15
-    public $creditBalance = 0;
15
+     public $creditBalance = 0;
16 16
 
17
-    /**
17
+     /**
18 18
      * User Builders Club Furniture Limit.
19 19
      *
20 20
      * @var int
21 21
      */
22
-    public $buildersClubFurniLimit = 0;
22
+     public $buildersClubFurniLimit = 0;
23 23
 
24
-    /**
24
+     /**
25 25
      * Remaining Builders Club Days.
26 26
      *
27 27
      * @var int
28 28
      */
29
-    public $buildersClubDays = 0;
29
+     public $buildersClubDays = 0;
30 30
 
31
-    /**
31
+     /**
32 32
      * User Habbo Club Days.
33 33
      *
34 34
      * @var int
35 35
      */
36
-    public $habboClubDays = 0;
36
+     public $habboClubDays = 0;
37 37
 
38
-    /**
38
+     /**
39 39
      * User Diamond Balance.
40 40
      *
41 41
      * @var int
42 42
      */
43
-    public $diamondBalance = 0;
43
+     public $diamondBalance = 0;
44 44
 
45
-    /**
45
+     /**
46 46
      * Create an User Purse.
47 47
      *
48 48
      * @TODO: Get User Left Habbo Club Days
49 49
      *
50 50
      * @param int $userId
51 51
      */
52
-    public function __construct(int $userId)
53
-    {
54
-        $userDiamonds = UserCurrency::where('user_id', $userId)->where('type', 5)->first();
55
-        $habboDays = floor(((UserSettings::where('user_id', $userId)->first()->club_expire_timestamp ?? 0) - time()) / 86400);
56
-
57
-        $this->creditBalance = User::find($userId)->credits;
58
-        $this->diamondBalance = $userDiamonds->amount ?? 0;
59
-        $this->habboClubDays = $habboDays > 0 ? $habboDays : 0;
60
-    }
52
+     public function __construct(int $userId)
53
+     {
54
+         $userDiamonds = UserCurrency::where('user_id', $userId)->where('type', 5)->first();
55
+         $habboDays = floor(((UserSettings::where('user_id', $userId)->first()->club_expire_timestamp ?? 0) - time()) / 86400);
56
+
57
+         $this->creditBalance = User::find($userId)->credits;
58
+         $this->diamondBalance = $userDiamonds->amount ?? 0;
59
+         $this->habboClubDays = $habboDays > 0 ? $habboDays : 0;
60
+     }
61 61
 }
Please login to merge, or discard this patch.
app/Models/Question.php 1 patch
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,35 +1,35 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class Question.
7 7
  */
8
-class Question
9
-{
10
-    /**
8
+ class Question
9
+ {
10
+     /**
11 11
      * Question Identifier (One or Two).
12 12
      *
13 13
      * @var int
14 14
      */
15
-    public $questionId = 1;
15
+     public $questionId = 1;
16 16
 
17
-    /**
17
+     /**
18 18
      * Question Key (Translate Text).
19 19
      *
20 20
      * @var string
21 21
      */
22
-    public $questionKey = '';
22
+     public $questionKey = '';
23 23
 
24
-    /**
24
+     /**
25 25
      * Store a Question.
26 26
      *
27 27
      * @param int    $questionId
28 28
      * @param string $questionKey
29 29
      */
30
-    public function __construct(int $questionId, string $questionKey)
31
-    {
32
-        $this->questionId = $questionId;
33
-        $this->questionKey = $questionKey;
34
-    }
30
+     public function __construct(int $questionId, string $questionKey)
31
+     {
32
+         $this->questionId = $questionId;
33
+         $this->questionKey = $questionKey;
34
+     }
35 35
 }
Please login to merge, or discard this patch.
app/Facades/User.php 1 patch
Switch Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Facades;
3
+ namespace App\Facades;
4 4
 
5
-use Illuminate\Support\Facades\Facade;
5
+ use Illuminate\Support\Facades\Facade;
6 6
 
7 7
 /**
8 8
  * Class User.
9 9
  */
10
-class User extends Facade
11
-{
12
-    /**
10
+ class User extends Facade
11
+ {
12
+     /**
13 13
      * Get the registered name of the component.
14 14
      *
15 15
      * @return string
16 16
      */
17
-    protected static function getFacadeAccessor()
18
-    {
19
-        return 'chocouser';
20
-    }
17
+     protected static function getFacadeAccessor()
18
+     {
19
+         return 'chocouser';
20
+     }
21 21
 }
Please login to merge, or discard this patch.