Completed
Push — development ( 3da724...5b8e45 )
by Claudio
05:15
created
app/Facades/Nux.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 Nux.
9 9
  */
10
-class Nux extends Facade
11
-{
12
-    /**
10
+ class Nux 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 'choconux';
20
-    }
17
+     protected static function getFacadeAccessor()
18
+     {
19
+         return 'choconux';
20
+     }
21 21
 }
Please login to merge, or discard this patch.
app/Facades/Session.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 Session.
9 9
  */
10
-class Session extends Facade
11
-{
12
-    /**
10
+ class Session 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 'chocosession';
20
-    }
17
+     protected static function getFacadeAccessor()
18
+     {
19
+         return 'chocosession';
20
+     }
21 21
 }
Please login to merge, or discard this patch.
app/Providers/AuthServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function boot()
21 21
     {
22
-        $this->app['auth']->viaRequest('api', function ($request) {
22
+        $this->app['auth']->viaRequest('api', function($request) {
23 23
             return User::getInstance()->getUser();
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Providers;
3
+ namespace App\Providers;
4 4
 
5
-use App\Helpers\User;
6
-use Illuminate\Support\ServiceProvider;
5
+ use App\Helpers\User;
6
+ use Illuminate\Support\ServiceProvider;
7 7
 
8 8
 /**
9 9
  * Class AuthServiceProvider.
10 10
  */
11
-class AuthServiceProvider extends ServiceProvider
12
-{
13
-    /**
11
+ class AuthServiceProvider extends ServiceProvider
12
+ {
13
+     /**
14 14
      * Boot the authentication services for the application.
15 15
      * If an User is stored in the Session recover it
16 16
      * Only will recover if the Path() isn't the Authentcation Path.
17 17
      *
18 18
      * @return void
19 19
      */
20
-    public function boot()
21
-    {
22
-        $this->app['auth']->viaRequest('api', function ($request) {
23
-            return User::getInstance()->getUser();
24
-        });
25
-    }
20
+     public function boot()
21
+     {
22
+         $this->app['auth']->viaRequest('api', function ($request) {
23
+             return User::getInstance()->getUser();
24
+         });
25
+     }
26 26
 }
Please login to merge, or discard this patch.
app/Helpers/Nux.php 1 patch
Switch Indentation   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -40,166 +40,166 @@
 block discarded – undo
40 40
         switch ($request->json()->get('roomIndex')):
41 41
             case 1:
42 42
                 return $this->createBedRoom($request->user());
43
-        case 2:
44
-                return $this->createPoolRoom($request->user());
45
-        case 3:
46
-                return $this->createClubRoom($request->user());
47
-        default:
48
-                return false;
49
-        endswitch;
50
-    }
51
-
52
-    /**
43
+         case 2:
44
+                 return $this->createPoolRoom($request->user());
45
+         case 3:
46
+                 return $this->createClubRoom($request->user());
47
+         default:
48
+                 return false;
49
+         endswitch;
50
+     }
51
+
52
+     /**
53 53
      * Create the NUX Bed Room.
54 54
      *
55 55
      * @param User $user
56 56
      *
57 57
      * @return bool
58 58
      */
59
-    protected function createBedRoom(User $user): bool
60
-    {
61
-        $room = (new Room())->store("{$user->name}'s room", "{$user->name} has entered the building", 'model_h', 25, 12, 610, 2403, 0.0, $user->uniqueId, $user->name);
62
-
63
-        $user->update(['home_room' => $room->id]);
64
-
65
-        // Floor Items
66
-        (new RoomItem())->store($user->uniqueId, $room->id, 15542, 9, 9, '0.00000', 4, '');
67
-        (new RoomItem())->store($user->uniqueId, $room->id, 15542, 9, 12, '0.00000', 0, '');
68
-        (new RoomItem())->store($user->uniqueId, $room->id, 15542, 10, 9, '0.00000', 4, '');
69
-        (new RoomItem())->store($user->uniqueId, $room->id, 15542, 10, 12, '0.00000', 0, '');
70
-        (new RoomItem())->store($user->uniqueId, $room->id, 16412, 9, 5, '1.00000', 0, '');
71
-        (new RoomItem())->store($user->uniqueId, $room->id, 16435, 7, 5, '1.00000', 0, '');
72
-        (new RoomItem())->store($user->uniqueId, $room->id, 16486, 8, 5, '1.00000', 0, '');
73
-        (new RoomItem())->store($user->uniqueId, $room->id, 17816, 6, 2, '1.00000', 0, '4');
74
-        (new RoomItem())->store($user->uniqueId, $room->id, 17816, 9, 2, '1.00000', 0, '4');
75
-        (new RoomItem())->store($user->uniqueId, $room->id, 17824, 7, 2, '1.00000', 0, '1');
76
-        (new RoomItem())->store($user->uniqueId, $room->id, 17894, 9, 10, '0.00000', 0, '');
77
-        (new RoomItem())->store($user->uniqueId, $room->id, 18074, 8, 4, '1.00000', 0, '1');
78
-        (new RoomItem())->store($user->uniqueId, $room->id, 18817, 3, 10, '0.01000', 2, '');
79
-        (new RoomItem())->store($user->uniqueId, $room->id, 18835, 3, 9, '0.00000', 0, '');
80
-        (new RoomItem())->store($user->uniqueId, $room->id, 18835, 3, 11, '0.00000', 0, '');
81
-        (new RoomItem())->store($user->uniqueId, $room->id, 18835, 5, 9, '0.00000', 0, '');
82
-        (new RoomItem())->store($user->uniqueId, $room->id, 18835, 5, 11, '0.00000', 0, '');
83
-
84
-        // Wall Items
85
-        (new RoomItem())->store($user->uniqueId, $room->id, 22988, 0, 0, '0', 0, '', ':w=4,2 l=0,35 l');
86
-        (new RoomItem())->store($user->uniqueId, $room->id, 23163, 0, 0, '0', 0, '1', ':w=4,8 l=0,43 r');
87
-        (new RoomItem())->store($user->uniqueId, $room->id, 23261, 0, 0, '0', 0, '', ':w=2,10 l=2,34 l');
88
-        (new RoomItem())->store($user->uniqueId, $room->id, 23331, 0, 0, '0', 0, '', ':w=2,10 l=2,29 l');
89
-
90
-        return true;
91
-    }
92
-
93
-    /**
59
+     protected function createBedRoom(User $user): bool
60
+     {
61
+         $room = (new Room())->store("{$user->name}'s room", "{$user->name} has entered the building", 'model_h', 25, 12, 610, 2403, 0.0, $user->uniqueId, $user->name);
62
+
63
+         $user->update(['home_room' => $room->id]);
64
+
65
+         // Floor Items
66
+         (new RoomItem())->store($user->uniqueId, $room->id, 15542, 9, 9, '0.00000', 4, '');
67
+         (new RoomItem())->store($user->uniqueId, $room->id, 15542, 9, 12, '0.00000', 0, '');
68
+         (new RoomItem())->store($user->uniqueId, $room->id, 15542, 10, 9, '0.00000', 4, '');
69
+         (new RoomItem())->store($user->uniqueId, $room->id, 15542, 10, 12, '0.00000', 0, '');
70
+         (new RoomItem())->store($user->uniqueId, $room->id, 16412, 9, 5, '1.00000', 0, '');
71
+         (new RoomItem())->store($user->uniqueId, $room->id, 16435, 7, 5, '1.00000', 0, '');
72
+         (new RoomItem())->store($user->uniqueId, $room->id, 16486, 8, 5, '1.00000', 0, '');
73
+         (new RoomItem())->store($user->uniqueId, $room->id, 17816, 6, 2, '1.00000', 0, '4');
74
+         (new RoomItem())->store($user->uniqueId, $room->id, 17816, 9, 2, '1.00000', 0, '4');
75
+         (new RoomItem())->store($user->uniqueId, $room->id, 17824, 7, 2, '1.00000', 0, '1');
76
+         (new RoomItem())->store($user->uniqueId, $room->id, 17894, 9, 10, '0.00000', 0, '');
77
+         (new RoomItem())->store($user->uniqueId, $room->id, 18074, 8, 4, '1.00000', 0, '1');
78
+         (new RoomItem())->store($user->uniqueId, $room->id, 18817, 3, 10, '0.01000', 2, '');
79
+         (new RoomItem())->store($user->uniqueId, $room->id, 18835, 3, 9, '0.00000', 0, '');
80
+         (new RoomItem())->store($user->uniqueId, $room->id, 18835, 3, 11, '0.00000', 0, '');
81
+         (new RoomItem())->store($user->uniqueId, $room->id, 18835, 5, 9, '0.00000', 0, '');
82
+         (new RoomItem())->store($user->uniqueId, $room->id, 18835, 5, 11, '0.00000', 0, '');
83
+
84
+         // Wall Items
85
+         (new RoomItem())->store($user->uniqueId, $room->id, 22988, 0, 0, '0', 0, '', ':w=4,2 l=0,35 l');
86
+         (new RoomItem())->store($user->uniqueId, $room->id, 23163, 0, 0, '0', 0, '1', ':w=4,8 l=0,43 r');
87
+         (new RoomItem())->store($user->uniqueId, $room->id, 23261, 0, 0, '0', 0, '', ':w=2,10 l=2,34 l');
88
+         (new RoomItem())->store($user->uniqueId, $room->id, 23331, 0, 0, '0', 0, '', ':w=2,10 l=2,29 l');
89
+
90
+         return true;
91
+     }
92
+
93
+     /**
94 94
      * Create the Pool Room.
95 95
      *
96 96
      * @param User $user
97 97
      *
98 98
      * @return bool
99 99
      */
100
-    protected function createPoolRoom(User $user): bool
101
-    {
102
-        $room = (new Room())->store("{$user->name}'s room", "{$user->name} has entered the building", 'model_h', 25, 12, 307, 3104, 1.10, $user->uniqueId, $user->name);
103
-
104
-        $user->update(['home_room' => $room->id]);
105
-
106
-        // Floor Items
107
-        (new RoomItem())->store($user->uniqueId, $room->id, 16715, 5, 11, 1.30000, 0, '');
108
-        (new RoomItem())->store($user->uniqueId, $room->id, 16732, 3, 10, 0.40000, 0, '');
109
-        (new RoomItem())->store($user->uniqueId, $room->id, 17016, 3, 9, 0.00000, 2, '1');
110
-        (new RoomItem())->store($user->uniqueId, $room->id, 17016, 3, 11, 0.00000, 0, '');
111
-        (new RoomItem())->store($user->uniqueId, $room->id, 17016, 4, 9, 0.00000, 4, '');
112
-        (new RoomItem())->store($user->uniqueId, $room->id, 17090, 3, 9, 0.00000, 2, '1');
113
-        (new RoomItem())->store($user->uniqueId, $room->id, 17176, 3, 9, 0.00000, 0, '');
114
-        (new RoomItem())->store($user->uniqueId, $room->id, 17176, 3, 9, 0.40000, 0, '');
115
-        (new RoomItem())->store($user->uniqueId, $room->id, 17176, 3, 10, 0.00000, 0, '');
116
-        (new RoomItem())->store($user->uniqueId, $room->id, 17190, 3, 11, 0.00000, 2, '');
117
-        (new RoomItem())->store($user->uniqueId, $room->id, 17190, 4, 9, 0.00000, 4, '');
118
-        (new RoomItem())->store($user->uniqueId, $room->id, 17191, 3, 10, 0.40000, 2, '');
119
-        (new RoomItem())->store($user->uniqueId, $room->id, 17191, 3, 12, 0.00000, 2, '');
120
-        (new RoomItem())->store($user->uniqueId, $room->id, 17484, 8, 3, 1.00000, 0, '0', 0);
121
-        (new RoomItem())->store($user->uniqueId, $room->id, 17499, 7, 3, 1.00000, 2, '');
122
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 7, 2, 1.00000, 0, '');
123
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 7, 4, 1.00000, 0, '');
124
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 7, 5, 1.00000, 0, '');
125
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 8, 2, 1.00000, 0, '');
126
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 8, 5, 1.00000, 0, '');
127
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 9, 2, 1.00000, 0, '');
128
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 9, 5, 1.00000, 0, '');
129
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 2, 1.00000, 0, '');
130
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 3, 1.00000, 0, '');
131
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 4, 1.00000, 0, '');
132
-        (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 5, 1.00000, 0, '');
133
-        (new RoomItem())->store($user->uniqueId, $room->id, 17987, 5, 11, 0.00000, 0, '');
134
-        (new RoomItem())->store($user->uniqueId, $room->id, 18051, 5, 2, 1.00000, 0, '');
135
-        (new RoomItem())->store($user->uniqueId, $room->id, 18051, 5, 4, 1.00000, 0, '');
136
-        (new RoomItem())->store($user->uniqueId, $room->id, 18051, 8, 9, 0.00000, 0, '');
137
-        (new RoomItem())->store($user->uniqueId, $room->id, 18051, 8, 11, 0.00000, 0, '');
138
-        (new RoomItem())->store($user->uniqueId, $room->id, 18051, 9, 9, 0.00000, 0, '');
139
-        (new RoomItem())->store($user->uniqueId, $room->id, 18051, 9, 11, 0.00000, 0, '');
140
-        (new RoomItem())->store($user->uniqueId, $room->id, 18061, 8, 8, 0.00000, 2, '');
141
-        (new RoomItem())->store($user->uniqueId, $room->id, 18061, 8, 9, 0.00000, 6, '1');
142
-        (new RoomItem())->store($user->uniqueId, $room->id, 18061, 10, 8, 0.00000, 4, '1');
143
-        (new RoomItem())->store($user->uniqueId, $room->id, 18070, 8, 2, 1.50000, 0, '1');
144
-        (new RoomItem())->store($user->uniqueId, $room->id, 18079, 9, 8, 0.00000, 0, '1');
145
-        (new RoomItem())->store($user->uniqueId, $room->id, 18363, 3, 9, 0.80000, 0, '2');
146
-
147
-        // Wall Items
148
-        (new RoomItem())->store($user->uniqueId, $room->id, 22996, 0, 0, '0', 0, '', ':w=4,8 l=7,45 r');
149
-        (new RoomItem())->store($user->uniqueId, $room->id, 22996, 0, 0, '0', 0, '', ':w=4,8 l=9,45 l');
150
-        (new RoomItem())->store($user->uniqueId, $room->id, 23063, 0, 0, '0', 0, '', ':w=2,10 l=10,56 l');
151
-        (new RoomItem())->store($user->uniqueId, $room->id, 23063, 0, 0, '0', 0, '', ':w=2,11 l=6,58 l');
152
-        (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '1', ':w=6,1 l=0,26 r');
153
-        (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '3', ':w=7,1 l=4,28 r');
154
-        (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '1', ':w=8,1 l=13,33 r');
155
-        (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '3', ':w=10,1 l=0,26 r');
156
-        (new RoomItem())->store($user->uniqueId, $room->id, 23229, 0, 0, '0', 0, '1', ':w=4,3 l=6,49 l');
157
-        (new RoomItem())->store($user->uniqueId, $room->id, 23229, 0, 0, '0', 0, '1', ':w=4,5 l=11,45 l');
158
-
159
-        return true;
160
-    }
161
-
162
-    /**
100
+     protected function createPoolRoom(User $user): bool
101
+     {
102
+         $room = (new Room())->store("{$user->name}'s room", "{$user->name} has entered the building", 'model_h', 25, 12, 307, 3104, 1.10, $user->uniqueId, $user->name);
103
+
104
+         $user->update(['home_room' => $room->id]);
105
+
106
+         // Floor Items
107
+         (new RoomItem())->store($user->uniqueId, $room->id, 16715, 5, 11, 1.30000, 0, '');
108
+         (new RoomItem())->store($user->uniqueId, $room->id, 16732, 3, 10, 0.40000, 0, '');
109
+         (new RoomItem())->store($user->uniqueId, $room->id, 17016, 3, 9, 0.00000, 2, '1');
110
+         (new RoomItem())->store($user->uniqueId, $room->id, 17016, 3, 11, 0.00000, 0, '');
111
+         (new RoomItem())->store($user->uniqueId, $room->id, 17016, 4, 9, 0.00000, 4, '');
112
+         (new RoomItem())->store($user->uniqueId, $room->id, 17090, 3, 9, 0.00000, 2, '1');
113
+         (new RoomItem())->store($user->uniqueId, $room->id, 17176, 3, 9, 0.00000, 0, '');
114
+         (new RoomItem())->store($user->uniqueId, $room->id, 17176, 3, 9, 0.40000, 0, '');
115
+         (new RoomItem())->store($user->uniqueId, $room->id, 17176, 3, 10, 0.00000, 0, '');
116
+         (new RoomItem())->store($user->uniqueId, $room->id, 17190, 3, 11, 0.00000, 2, '');
117
+         (new RoomItem())->store($user->uniqueId, $room->id, 17190, 4, 9, 0.00000, 4, '');
118
+         (new RoomItem())->store($user->uniqueId, $room->id, 17191, 3, 10, 0.40000, 2, '');
119
+         (new RoomItem())->store($user->uniqueId, $room->id, 17191, 3, 12, 0.00000, 2, '');
120
+         (new RoomItem())->store($user->uniqueId, $room->id, 17484, 8, 3, 1.00000, 0, '0', 0);
121
+         (new RoomItem())->store($user->uniqueId, $room->id, 17499, 7, 3, 1.00000, 2, '');
122
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 7, 2, 1.00000, 0, '');
123
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 7, 4, 1.00000, 0, '');
124
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 7, 5, 1.00000, 0, '');
125
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 8, 2, 1.00000, 0, '');
126
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 8, 5, 1.00000, 0, '');
127
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 9, 2, 1.00000, 0, '');
128
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 9, 5, 1.00000, 0, '');
129
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 2, 1.00000, 0, '');
130
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 3, 1.00000, 0, '');
131
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 4, 1.00000, 0, '');
132
+         (new RoomItem())->store($user->uniqueId, $room->id, 17520, 10, 5, 1.00000, 0, '');
133
+         (new RoomItem())->store($user->uniqueId, $room->id, 17987, 5, 11, 0.00000, 0, '');
134
+         (new RoomItem())->store($user->uniqueId, $room->id, 18051, 5, 2, 1.00000, 0, '');
135
+         (new RoomItem())->store($user->uniqueId, $room->id, 18051, 5, 4, 1.00000, 0, '');
136
+         (new RoomItem())->store($user->uniqueId, $room->id, 18051, 8, 9, 0.00000, 0, '');
137
+         (new RoomItem())->store($user->uniqueId, $room->id, 18051, 8, 11, 0.00000, 0, '');
138
+         (new RoomItem())->store($user->uniqueId, $room->id, 18051, 9, 9, 0.00000, 0, '');
139
+         (new RoomItem())->store($user->uniqueId, $room->id, 18051, 9, 11, 0.00000, 0, '');
140
+         (new RoomItem())->store($user->uniqueId, $room->id, 18061, 8, 8, 0.00000, 2, '');
141
+         (new RoomItem())->store($user->uniqueId, $room->id, 18061, 8, 9, 0.00000, 6, '1');
142
+         (new RoomItem())->store($user->uniqueId, $room->id, 18061, 10, 8, 0.00000, 4, '1');
143
+         (new RoomItem())->store($user->uniqueId, $room->id, 18070, 8, 2, 1.50000, 0, '1');
144
+         (new RoomItem())->store($user->uniqueId, $room->id, 18079, 9, 8, 0.00000, 0, '1');
145
+         (new RoomItem())->store($user->uniqueId, $room->id, 18363, 3, 9, 0.80000, 0, '2');
146
+
147
+         // Wall Items
148
+         (new RoomItem())->store($user->uniqueId, $room->id, 22996, 0, 0, '0', 0, '', ':w=4,8 l=7,45 r');
149
+         (new RoomItem())->store($user->uniqueId, $room->id, 22996, 0, 0, '0', 0, '', ':w=4,8 l=9,45 l');
150
+         (new RoomItem())->store($user->uniqueId, $room->id, 23063, 0, 0, '0', 0, '', ':w=2,10 l=10,56 l');
151
+         (new RoomItem())->store($user->uniqueId, $room->id, 23063, 0, 0, '0', 0, '', ':w=2,11 l=6,58 l');
152
+         (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '1', ':w=6,1 l=0,26 r');
153
+         (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '3', ':w=7,1 l=4,28 r');
154
+         (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '1', ':w=8,1 l=13,33 r');
155
+         (new RoomItem())->store($user->uniqueId, $room->id, 23078, 0, 0, '0', 0, '3', ':w=10,1 l=0,26 r');
156
+         (new RoomItem())->store($user->uniqueId, $room->id, 23229, 0, 0, '0', 0, '1', ':w=4,3 l=6,49 l');
157
+         (new RoomItem())->store($user->uniqueId, $room->id, 23229, 0, 0, '0', 0, '1', ':w=4,5 l=11,45 l');
158
+
159
+         return true;
160
+     }
161
+
162
+     /**
163 163
      * Create the NUX Club Room.
164 164
      *
165 165
      * @param User $user
166 166
      *
167 167
      * @return bool
168 168
      */
169
-    protected function createClubRoom(User $user): bool
170
-    {
171
-        $room = (new Room())->store("{$user->name}'s room", "{$user->name} has entered the building", 'model_h', 25, 12, 409, 1902, 0.0, $user->uniqueId, $user->name);
172
-
173
-        $user->update(['home_room' => $room->id]);
174
-
175
-        // Floor Items
176
-        (new RoomItem())->store($user->uniqueId, $room->id, 16904, 4, 11, '0.00000', 0, '1');
177
-        (new RoomItem())->store($user->uniqueId, $room->id, 16905, 6, 9, '0.00000', 0, '1');
178
-        (new RoomItem())->store($user->uniqueId, $room->id, 16905, 6, 10, '0.00000', 0, '1');
179
-        (new RoomItem())->store($user->uniqueId, $room->id, 16905, 8, 9, '0.00000', 0, '1');
180
-        (new RoomItem())->store($user->uniqueId, $room->id, 16905, 8, 10, '0.00000', 0, '1');
181
-        (new RoomItem())->store($user->uniqueId, $room->id, 16907, 5, 9, '0.00000', 6, '');
182
-        (new RoomItem())->store($user->uniqueId, $room->id, 16907, 5, 10, '0.00000', 6, '');
183
-        (new RoomItem())->store($user->uniqueId, $room->id, 16909, 4, 9, '0.00000', 2, '1');
184
-        (new RoomItem())->store($user->uniqueId, $room->id, 16909, 4, 10, '0.00000', 2, '1');
185
-        (new RoomItem())->store($user->uniqueId, $room->id, 16913, 6, 7, '1.30000', 0, '3');
186
-        (new RoomItem())->store($user->uniqueId, $room->id, 16913, 9, 7, '1.30000', 0, '3');
187
-        (new RoomItem())->store($user->uniqueId, $room->id, 17189, 10, 2, '1.00000', 0, '');
188
-        (new RoomItem())->store($user->uniqueId, $room->id, 17573, 6, 7, '0.00000', 0, '3');
189
-        (new RoomItem())->store($user->uniqueId, $room->id, 17573, 7, 7, '0.00000', 0, '3');
190
-        (new RoomItem())->store($user->uniqueId, $room->id, 17573, 8, 7, '0.00000', 0, '3');
191
-        (new RoomItem())->store($user->uniqueId, $room->id, 17573, 9, 7, '0.00000', 0, '3');
192
-        (new RoomItem())->store($user->uniqueId, $room->id, 18048, 7, 2, '1.00000', 4, '');
193
-        (new RoomItem())->store($user->uniqueId, $room->id, 18082, 6, 3, '1.00000', 2, '');
194
-        (new RoomItem())->store($user->uniqueId, $room->id, 18082, 9, 3, '1.00000', 6, '');
195
-
196
-        // Wall Items
197
-        (new RoomItem())->store($user->uniqueId, $room->id, 23008, 0, 0, '0', 0, '2', ':w=4,8 l=0,27 r');
198
-        (new RoomItem())->store($user->uniqueId, $room->id, 23013, 0, 0, '0', 0, '', ':w=2,10 l=2,44 l');
199
-        (new RoomItem())->store($user->uniqueId, $room->id, 23014, 0, 0, '0', 0, '1', ':w=8,1 l=14,27 r');
200
-        (new RoomItem())->store($user->uniqueId, $room->id, 23236, 0, 0, '0', 0, '1', ':w=6,1 l=5,31 r');
201
-        (new RoomItem())->store($user->uniqueId, $room->id, 23239, 0, 0, '0', 0, '', ':w=4,7 l=4,29 l');
202
-
203
-        return true;
204
-    }
169
+     protected function createClubRoom(User $user): bool
170
+     {
171
+         $room = (new Room())->store("{$user->name}'s room", "{$user->name} has entered the building", 'model_h', 25, 12, 409, 1902, 0.0, $user->uniqueId, $user->name);
172
+
173
+         $user->update(['home_room' => $room->id]);
174
+
175
+         // Floor Items
176
+         (new RoomItem())->store($user->uniqueId, $room->id, 16904, 4, 11, '0.00000', 0, '1');
177
+         (new RoomItem())->store($user->uniqueId, $room->id, 16905, 6, 9, '0.00000', 0, '1');
178
+         (new RoomItem())->store($user->uniqueId, $room->id, 16905, 6, 10, '0.00000', 0, '1');
179
+         (new RoomItem())->store($user->uniqueId, $room->id, 16905, 8, 9, '0.00000', 0, '1');
180
+         (new RoomItem())->store($user->uniqueId, $room->id, 16905, 8, 10, '0.00000', 0, '1');
181
+         (new RoomItem())->store($user->uniqueId, $room->id, 16907, 5, 9, '0.00000', 6, '');
182
+         (new RoomItem())->store($user->uniqueId, $room->id, 16907, 5, 10, '0.00000', 6, '');
183
+         (new RoomItem())->store($user->uniqueId, $room->id, 16909, 4, 9, '0.00000', 2, '1');
184
+         (new RoomItem())->store($user->uniqueId, $room->id, 16909, 4, 10, '0.00000', 2, '1');
185
+         (new RoomItem())->store($user->uniqueId, $room->id, 16913, 6, 7, '1.30000', 0, '3');
186
+         (new RoomItem())->store($user->uniqueId, $room->id, 16913, 9, 7, '1.30000', 0, '3');
187
+         (new RoomItem())->store($user->uniqueId, $room->id, 17189, 10, 2, '1.00000', 0, '');
188
+         (new RoomItem())->store($user->uniqueId, $room->id, 17573, 6, 7, '0.00000', 0, '3');
189
+         (new RoomItem())->store($user->uniqueId, $room->id, 17573, 7, 7, '0.00000', 0, '3');
190
+         (new RoomItem())->store($user->uniqueId, $room->id, 17573, 8, 7, '0.00000', 0, '3');
191
+         (new RoomItem())->store($user->uniqueId, $room->id, 17573, 9, 7, '0.00000', 0, '3');
192
+         (new RoomItem())->store($user->uniqueId, $room->id, 18048, 7, 2, '1.00000', 4, '');
193
+         (new RoomItem())->store($user->uniqueId, $room->id, 18082, 6, 3, '1.00000', 2, '');
194
+         (new RoomItem())->store($user->uniqueId, $room->id, 18082, 9, 3, '1.00000', 6, '');
195
+
196
+         // Wall Items
197
+         (new RoomItem())->store($user->uniqueId, $room->id, 23008, 0, 0, '0', 0, '2', ':w=4,8 l=0,27 r');
198
+         (new RoomItem())->store($user->uniqueId, $room->id, 23013, 0, 0, '0', 0, '', ':w=2,10 l=2,44 l');
199
+         (new RoomItem())->store($user->uniqueId, $room->id, 23014, 0, 0, '0', 0, '1', ':w=8,1 l=14,27 r');
200
+         (new RoomItem())->store($user->uniqueId, $room->id, 23236, 0, 0, '0', 0, '1', ':w=6,1 l=5,31 r');
201
+         (new RoomItem())->store($user->uniqueId, $room->id, 23239, 0, 0, '0', 0, '', ':w=4,7 l=4,29 l');
202
+
203
+         return true;
204
+     }
205 205
 }
Please login to merge, or discard this patch.
app/Models/UserSecurity.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      */
60 60
     public function getTrustedDevicesAttribute(): array
61 61
     {
62
-        return TrustedDevice::where('user_id', $this->attributes['user_id'])->get(['ip_address'])->map(function ($item) {
62
+        return TrustedDevice::where('user_id', $this->attributes['user_id'])->get(['ip_address'])->map(function($item) {
63 63
             return $item->ip_address;
64 64
         })->toArray();
65 65
     }
Please login to merge, or discard this patch.
Switch Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,69 +1,69 @@  discard block
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class UserSecurity.
7 7
  */
8
-class UserSecurity extends ChocolateyModel
9
-{
10
-    /**
8
+ class UserSecurity 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 = 'chocolatey_users_security';
22
+     protected $table = 'chocolatey_users_security';
23 23
 
24
-    /**
24
+     /**
25 25
      * Primary Key of the Table.
26 26
      *
27 27
      * @var string
28 28
      */
29
-    protected $primaryKey = 'user_id';
29
+     protected $primaryKey = 'user_id';
30 30
 
31
-    /**
31
+     /**
32 32
      * The attributes excluded from the model's JSON form.
33 33
      *
34 34
      * @var array
35 35
      */
36
-    protected $hidden = ['user_id'];
36
+     protected $hidden = ['user_id'];
37 37
 
38
-    /**
38
+     /**
39 39
      * The Appender(s) of the Model.
40 40
      *
41 41
      * @var array
42 42
      */
43
-    protected $appends = [
44
-        'trustedDevices',
45
-    ];
43
+     protected $appends = [
44
+         'trustedDevices',
45
+     ];
46 46
 
47
-    /**
47
+     /**
48 48
      * The attributes that are mass assignable.
49 49
      *
50 50
      * @var array
51 51
      */
52
-    protected $fillable = ['user_id', 'firstQuestion', 'secondQuestion', 'firstAnswer', 'secondAnswer'];
52
+     protected $fillable = ['user_id', 'firstQuestion', 'secondQuestion', 'firstAnswer', 'secondAnswer'];
53 53
 
54
-    /**
54
+     /**
55 55
      * Get Trusted Devices.
56 56
      *
57 57
      * @return array
58 58
      */
59
-    public function getTrustedDevicesAttribute(): array
60
-    {
61
-        return TrustedDevice::where('user_id', $this->attributes['user_id'])->get(['ip_address'])->map(function ($item) {
62
-            return $item->ip_address;
63
-        })->toArray();
64
-    }
59
+     public function getTrustedDevicesAttribute(): array
60
+     {
61
+         return TrustedDevice::where('user_id', $this->attributes['user_id'])->get(['ip_address'])->map(function ($item) {
62
+             return $item->ip_address;
63
+         })->toArray();
64
+     }
65 65
 
66
-    /**
66
+     /**
67 67
      * Store a new User Security Metadata.
68 68
      *
69 69
      * @param int    $userId
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
      *
75 75
      * @return UserSecurity
76 76
      */
77
-    public function store(int $userId, int $firstQuestion, int $secondQuestion, string $firstAnswer, string $secondAnswer): UserSecurity
78
-    {
79
-        $this->attributes['user_id'] = $userId;
80
-        $this->attributes['firstQuestion'] = $firstQuestion;
81
-        $this->attributes['secondQuestion'] = $secondQuestion;
82
-        $this->attributes['firstAnswer'] = $firstAnswer;
83
-        $this->attributes['secondAnswer'] = $secondAnswer;
84
-        $this->timestamps = false;
77
+     public function store(int $userId, int $firstQuestion, int $secondQuestion, string $firstAnswer, string $secondAnswer): UserSecurity
78
+     {
79
+         $this->attributes['user_id'] = $userId;
80
+         $this->attributes['firstQuestion'] = $firstQuestion;
81
+         $this->attributes['secondQuestion'] = $secondQuestion;
82
+         $this->attributes['firstAnswer'] = $firstAnswer;
83
+         $this->attributes['secondAnswer'] = $secondAnswer;
84
+         $this->timestamps = false;
85 85
 
86
-        return $this;
87
-    }
86
+         return $this;
87
+     }
88 88
 }
Please login to merge, or discard this patch.
app/Providers/ValidationServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function register()
20 20
     {
21
-        $this->app->bind('chocovalidate', function () {
21
+        $this->app->bind('chocovalidate', function() {
22 22
             return Validation::getInstance();
23 23
         });
24 24
     }
Please login to merge, or discard this patch.
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Providers;
3
+ namespace App\Providers;
4 4
 
5
-use App\Helpers\Validation;
6
-use Illuminate\Support\ServiceProvider;
5
+ use App\Helpers\Validation;
6
+ use Illuminate\Support\ServiceProvider;
7 7
 
8 8
 /**
9 9
  * Class ValidationServiceProvider.
10 10
  */
11
-class ValidationServiceProvider extends ServiceProvider
12
-{
13
-    /**
11
+ class ValidationServiceProvider extends ServiceProvider
12
+ {
13
+     /**
14 14
      * Register the Session Service Provider.
15 15
      *
16 16
      * @return void
17 17
      */
18
-    public function register()
19
-    {
20
-        $this->app->bind('chocovalidate', function () {
21
-            return Validation::getInstance();
22
-        });
23
-    }
18
+     public function register()
19
+     {
20
+         $this->app->bind('chocovalidate', function () {
21
+             return Validation::getInstance();
22
+         });
23
+     }
24 24
 }
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             'block_friendrequests' => $request->json()->get('friendRequestEnabled') == false ? '1' : '0',
79 79
         ]);
80 80
 
81
-        foreach ((array) $request->json()->all() as $setting => $value) {
81
+        foreach ((array)$request->json()->all() as $setting => $value) {
82 82
             UserPreferences::find(UserFacade::getUser()->uniqueId)->update([$setting => $value == true ? '1' : '0']);
83 83
         }
84 84
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         $token = Mail::store($userInfo['email'], 'public/registration/activate');
146 146
 
147
-        Mail::send(['email' => $userInfo['email'], 'name' => $userName, 'url' => "/activate/{$token}", 'subject' => 'Welcome to '.Config::get('chocolatey.hotelName')]);
147
+        Mail::send(['email' => $userInfo['email'], 'name' => $userName, 'url' => "/activate/{$token}", 'subject' => 'Welcome to ' . Config::get('chocolatey.hotelName')]);
148 148
 
149 149
         return UserFacade::setSession((new User())->store($userName, $userInfo['email'], $request->ip(), $newUser));
150 150
     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     {
163 163
         $partialName = explode(' ', (new Alliteration())->getName());
164 164
 
165
-        return strtolower($partialName[0].strstr($userMail, '@', true).$partialName[1]);
165
+        return strtolower($partialName[0] . strstr($userMail, '@', true) . $partialName[1]);
166 166
     }
167 167
 
168 168
     /**
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $token = Mail::store(UserFacade::getUser()->email, 'public/registration/activate');
212 212
 
213 213
         Mail::send(['name' => UserFacade::getUser()->name, 'email' => $request->user()->email,
214
-            'url'          => "/activate/{$token}", 'subject' => 'Welcome to '.Config::get('chocolatey.hotelName'),
214
+            'url'          => "/activate/{$token}", 'subject' => 'Welcome to ' . Config::get('chocolatey.hotelName'),
215 215
         ]);
216 216
 
217 217
         return response(null);
Please login to merge, or discard this patch.
app/Models/Photo.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getIdAttribute(): string
56 56
     {
57
-        return (string) $this->attributes['id'];
57
+        return (string)$this->attributes['id'];
58 58
     }
59 59
 
60 60
     /**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function getLikesAttribute(): array
108 108
     {
109
-        return array_map(function (array $item) {
109
+        return array_map(function(array $item) {
110 110
             return $item['username'];
111 111
         }, PhotoLike::query()->select('username')->where('photo_id', $this->attributes['id'])->get(['username'])->toArray());
112 112
     }
Please login to merge, or discard this patch.
Switch Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,145 +1,145 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5
-use Sofa\Eloquence\Eloquence;
6
-use Sofa\Eloquence\Mappable;
5
+ use Sofa\Eloquence\Eloquence;
6
+ use Sofa\Eloquence\Mappable;
7 7
 
8 8
 /**
9 9
  * Class Photo.
10 10
  */
11
-class Photo extends ChocolateyModel
12
-{
13
-    use Eloquence, Mappable;
11
+ class Photo extends ChocolateyModel
12
+ {
13
+     use Eloquence, Mappable;
14 14
 
15
-    /**
15
+     /**
16 16
      * The table associated with the model.
17 17
      *
18 18
      * @var string
19 19
      */
20
-    protected $table = 'camera_web';
20
+     protected $table = 'camera_web';
21 21
 
22
-    /**
22
+     /**
23 23
      * Primary Key of the Table.
24 24
      *
25 25
      * @var string
26 26
      */
27
-    protected $primaryKey = 'id';
27
+     protected $primaryKey = 'id';
28 28
 
29
-    /**
29
+     /**
30 30
      * The attributes that will be mapped.
31 31
      *
32 32
      * @var array
33 33
      */
34
-    protected $maps = ['creator_id' => 'user_id', 'previewUrl' => 'url', 'creator_uniqueId' => 'user_id', 'time' => 'timestamp'];
34
+     protected $maps = ['creator_id' => 'user_id', 'previewUrl' => 'url', 'creator_uniqueId' => 'user_id', 'time' => 'timestamp'];
35 35
 
36
-    /**
36
+     /**
37 37
      * The Appender(s) of the Model.
38 38
      *
39 39
      * @var array
40 40
      */
41
-    protected $appends = ['creator_uniqueId', 'version', 'previewUrl', 'creator_id', 'likes', 'tags', 'version', 'type', 'room_id', 'creator_name'];
41
+     protected $appends = ['creator_uniqueId', 'version', 'previewUrl', 'creator_id', 'likes', 'tags', 'version', 'type', 'room_id', 'creator_name'];
42 42
 
43
-    /**
43
+     /**
44 44
      * The attributes that should be casted to native types.
45 45
      *
46 46
      * @var array
47 47
      */
48
-    protected $casts = ['tags' => 'array', 'creator_uniqueId' => 'string'];
48
+     protected $casts = ['tags' => 'array', 'creator_uniqueId' => 'string'];
49 49
 
50
-    /**
50
+     /**
51 51
      * Get the Unique Id of the Photo.
52 52
      *
53 53
      * @return string
54 54
      */
55
-    public function getIdAttribute(): string
56
-    {
57
-        return (string) $this->attributes['id'];
58
-    }
55
+     public function getIdAttribute(): string
56
+     {
57
+         return (string) $this->attributes['id'];
58
+     }
59 59
 
60
-    /**
60
+     /**
61 61
      * Get the URL of the Photo.
62 62
      *
63 63
      * @return string
64 64
      */
65
-    public function getUrlAttribute(): string
66
-    {
67
-        return str_replace('http:', '', str_replace('https:', '', $this->attributes['url']));
68
-    }
65
+     public function getUrlAttribute(): string
66
+     {
67
+         return str_replace('http:', '', str_replace('https:', '', $this->attributes['url']));
68
+     }
69 69
 
70
-    /**
70
+     /**
71 71
      * Get the Version Attribute.
72 72
      *
73 73
      * @return int
74 74
      */
75
-    public function getVersionAttribute(): int
76
-    {
77
-        return 1;
78
-    }
75
+     public function getVersionAttribute(): int
76
+     {
77
+         return 1;
78
+     }
79 79
 
80
-    /**
80
+     /**
81 81
      * Get All Tags
82 82
      * Transforming it on an Array.
83 83
      *
84 84
      * @return array(string)
85 85
      */
86
-    public function getTagsAttribute(): array
87
-    {
88
-        return [];
89
-    }
86
+     public function getTagsAttribute(): array
87
+     {
88
+         return [];
89
+     }
90 90
 
91
-    /**
91
+     /**
92 92
      * Get Formatted Time
93 93
      * Convert Date to UNIX Timestamp.
94 94
      *
95 95
      * @return int
96 96
      */
97
-    public function getTimeAttribute(): int
98
-    {
99
-        return strtotime($this->attributes['timestamp']) * 1000;
100
-    }
97
+     public function getTimeAttribute(): int
98
+     {
99
+         return strtotime($this->attributes['timestamp']) * 1000;
100
+     }
101 101
 
102
-    /**
102
+     /**
103 103
      * Get Photo Likes Directly as Username.
104 104
      *
105 105
      * @return array
106 106
      */
107
-    public function getLikesAttribute(): array
108
-    {
109
-        return array_map(function (array $item) {
110
-            return $item['username'];
111
-        }, PhotoLike::query()->select('username')->where('photo_id', $this->attributes['id'])->get(['username'])->toArray());
112
-    }
113
-
114
-    /**
107
+     public function getLikesAttribute(): array
108
+     {
109
+         return array_map(function (array $item) {
110
+             return $item['username'];
111
+         }, PhotoLike::query()->select('username')->where('photo_id', $this->attributes['id'])->get(['username'])->toArray());
112
+     }
113
+
114
+     /**
115 115
      * Get the Photo Type Attribute.
116 116
      *
117 117
      * @return string
118 118
      */
119
-    public function getTypeAttribute(): string
120
-    {
121
-        return 'PHOTO';
122
-    }
119
+     public function getTypeAttribute(): string
120
+     {
121
+         return 'PHOTO';
122
+     }
123 123
 
124
-    /**
124
+     /**
125 125
      * Get Room Id.
126 126
      *
127 127
      * @TODO: Add real RoomID
128 128
      *
129 129
      * @return int
130 130
      */
131
-    public function getRoomIdAttribute(): int
132
-    {
133
-        return 1;
134
-    }
131
+     public function getRoomIdAttribute(): int
132
+     {
133
+         return 1;
134
+     }
135 135
 
136
-    /**
136
+     /**
137 137
      * Get User Name.
138 138
      *
139 139
      * @return string
140 140
      */
141
-    public function getCreatorNameAttribute(): string
142
-    {
143
-        return User::find($this->attributes['user_id'])->name;
144
-    }
141
+     public function getCreatorNameAttribute(): string
142
+     {
143
+         return User::find($this->attributes['user_id'])->name;
144
+     }
145 145
 }
Please login to merge, or discard this patch.
app/Helpers/Validation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function checkWords(string $needle): bool
48 48
     {
49
-        return count(array_filter(Config::get('chocolatey.invalid'), function ($illegal) use ($needle) {
49
+        return count(array_filter(Config::get('chocolatey.invalid'), function($illegal) use ($needle) {
50 50
             return stripos($needle, $illegal) !== false;
51 51
         })) == 0;
52 52
     }
Please login to merge, or discard this patch.