Completed
Pull Request — development (#318)
by Claudio
06:27 queued 04:33
created
app/Helpers/Mail.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function send(array $configuration, string $view = 'habbo-web-mail.confirm-mail')
29 29
     {
30 30
         if (Config::get('mail.enable')) {
31
-            MailFacade::send($view, $configuration, function ($message) use ($configuration) {
31
+            MailFacade::send($view, $configuration, function($message) use ($configuration) {
32 32
                 $message->from(Config::get('mail.from.address'), Config::get('mail.from.name'));
33 33
                 $message->to($configuration['email'])->subject($configuration['subject']);
34 34
             });
Please login to merge, or discard this patch.
Switch Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@  discard block
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Helpers;
3
+ namespace App\Helpers;
4 4
 
5
-use App\Models\Mail as MailModel;
6
-use App\Singleton;
7
-use Illuminate\Support\Facades\Config;
8
-use Illuminate\Support\Facades\Mail as MailFacade;
5
+ use App\Models\Mail as MailModel;
6
+ use App\Singleton;
7
+ use Illuminate\Support\Facades\Config;
8
+ use Illuminate\Support\Facades\Mail as MailFacade;
9 9
 
10 10
 /**
11 11
  * Class Mail.
12 12
  */
13
-final class Mail extends Singleton
14
-{
15
-    /**
13
+ final class Mail extends Singleton
14
+ {
15
+     /**
16 16
      * Stored Mail Model.
17 17
      *
18 18
      * @var MailModel
19 19
      */
20
-    protected $mailModel;
20
+     protected $mailModel;
21 21
 
22
-    /**
22
+     /**
23 23
      * Send an Email.
24 24
      *
25 25
      * @param array  $configuration
26 26
      * @param string $view
27 27
      */
28
-    public function send(array $configuration, string $view = 'habbo-web-mail.confirm-mail')
29
-    {
30
-        if (Config::get('mail.enable')) {
31
-            MailFacade::send($view, $configuration, function ($message) use ($configuration) {
32
-                $message->from(Config::get('mail.from.address'), Config::get('mail.from.name'));
33
-                $message->to($configuration['email'])->subject($configuration['subject']);
34
-            });
35
-        }
36
-    }
28
+     public function send(array $configuration, string $view = 'habbo-web-mail.confirm-mail')
29
+     {
30
+         if (Config::get('mail.enable')) {
31
+             MailFacade::send($view, $configuration, function ($message) use ($configuration) {
32
+                 $message->from(Config::get('mail.from.address'), Config::get('mail.from.name'));
33
+                 $message->to($configuration['email'])->subject($configuration['subject']);
34
+             });
35
+         }
36
+     }
37 37
 
38
-    /**
38
+     /**
39 39
      * Store an E-mail.
40 40
      *
41 41
      * @param string $email
@@ -43,72 +43,72 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * @return string
45 45
      */
46
-    public function store(string $email, string $url): string
47
-    {
48
-        (new MailModel())->store($token = uniqid('HabboMail', true), $url, $email);
46
+     public function store(string $email, string $url): string
47
+     {
48
+         (new MailModel())->store($token = uniqid('HabboMail', true), $url, $email);
49 49
 
50
-        return $token;
51
-    }
50
+         return $token;
51
+     }
52 52
 
53
-    /**
53
+     /**
54 54
      * Return if Exists E-Mail with that Token.
55 55
      *
56 56
      * @param string $token
57 57
      *
58 58
      * @return bool
59 59
      */
60
-    public function has(string $token)
61
-    {
62
-        return $this->get($token) !== null;
63
-    }
60
+     public function has(string $token)
61
+     {
62
+         return $this->get($token) !== null;
63
+     }
64 64
 
65
-    /**
65
+     /**
66 66
      * Get an E-mail by Token.
67 67
      *
68 68
      * @param string $token
69 69
      *
70 70
      * @return MailModel
71 71
      */
72
-    public function get(string $token = '')
73
-    {
74
-        if ($this->mailModel == null && !empty($token)) {
75
-            $mailModel = MailModel::where('token', $token)->where('used', '0')->first();
72
+     public function get(string $token = '')
73
+     {
74
+         if ($this->mailModel == null && !empty($token)) {
75
+             $mailModel = MailModel::where('token', $token)->where('used', '0')->first();
76 76
 
77
-            if ($mailModel !== null) {
78
-                if (strtotime($mailModel->created_at) + (Config::get('mail.expire') * 24 * 60 * 60) >= time()) {
79
-                    $this->set($mailModel);
77
+             if ($mailModel !== null) {
78
+                 if (strtotime($mailModel->created_at) + (Config::get('mail.expire') * 24 * 60 * 60) >= time()) {
79
+                     $this->set($mailModel);
80 80
 
81
-                    $this->update(['used' => '1']);
82
-                }
83
-            }
84
-        }
81
+                     $this->update(['used' => '1']);
82
+                 }
83
+             }
84
+         }
85 85
 
86
-        return $this->mailModel;
87
-    }
86
+         return $this->mailModel;
87
+     }
88 88
 
89
-    /**
89
+     /**
90 90
      * Set Mail Model in Cache.
91 91
      *
92 92
      * @param MailModel $model
93 93
      *
94 94
      * @return MailModel
95 95
      */
96
-    public function set(MailModel $model)
97
-    {
98
-        return $this->mailModel = $model;
99
-    }
96
+     public function set(MailModel $model)
97
+     {
98
+         return $this->mailModel = $model;
99
+     }
100 100
 
101
-    /**
101
+     /**
102 102
      * Update Mail Model Data.
103 103
      *
104 104
      * @param array $parameters
105 105
      *
106 106
      * @return MailModel
107 107
      */
108
-    public function update(array $parameters)
109
-    {
110
-        $this->mailModel->update($parameters);
108
+     public function update(array $parameters)
109
+     {
110
+         $this->mailModel->update($parameters);
111 111
 
112
-        return $this->mailModel;
113
-    }
112
+         return $this->mailModel;
113
+     }
114 114
 }
Please login to merge, or discard this patch.
app/Helpers/Session.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     /**
66 66
      * Check if a Key exists in the Session.
67 67
      *
68
-     * @param mixed $key
68
+     * @param string $key
69 69
      *
70 70
      * @return bool
71 71
      */
Please login to merge, or discard this patch.
app/Models/ShopCategory.php 1 patch
Switch Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,64 +1,64 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class ShopCategory.
7 7
  */
8
-class ShopCategory extends ChocolateyModel
9
-{
10
-    /**
8
+ class ShopCategory 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_shop_items_categories';
22
+     protected $table = 'chocolatey_shop_items_categories';
23 23
 
24
-    /**
24
+     /**
25 25
      * Primary Key of the Table.
26 26
      *
27 27
      * @var string
28 28
      */
29
-    protected $primaryKey = 'category_name';
29
+     protected $primaryKey = 'category_name';
30 30
 
31
-    /**
31
+     /**
32 32
      * The Appender(s) of the Model.
33 33
      *
34 34
      * @var array
35 35
      */
36
-    protected $appends = ['category'];
36
+     protected $appends = ['category'];
37 37
 
38
-    /**
38
+     /**
39 39
      * Store an Shop Country.
40 40
      *
41 41
      * @param string $categoryName
42 42
      *
43 43
      * @return ShopCategory
44 44
      */
45
-    public function store(string $categoryName): ShopCategory
46
-    {
47
-        $this->attributes['category_name'] = $categoryName;
48
-        $this->timestamps = false;
45
+     public function store(string $categoryName): ShopCategory
46
+     {
47
+         $this->attributes['category_name'] = $categoryName;
48
+         $this->timestamps = false;
49 49
 
50
-        $this->save();
50
+         $this->save();
51 51
 
52
-        return $this;
53
-    }
52
+         return $this;
53
+     }
54 54
 
55
-    /**
55
+     /**
56 56
      * Get Shop Category Name.
57 57
      *
58 58
      * @return string
59 59
      */
60
-    public function getCategoryAttribute(): string
61
-    {
62
-        return $this->attributes['category_name'];
63
-    }
60
+     public function getCategoryAttribute(): string
61
+     {
62
+         return $this->attributes['category_name'];
63
+     }
64 64
 }
Please login to merge, or discard this patch.
app/Models/Ban.php 1 patch
Switch Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,34 +1,34 @@  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 Ban.
7 7
  */
8
-class Ban extends ChocolateyModel
9
-{
10
-    /**
8
+ class Ban 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 = 'bans';
22
+     protected $table = 'bans';
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
 
31
-    /**
31
+     /**
32 32
      * Store an User Ban.
33 33
      *
34 34
      * @param int    $userId
@@ -41,30 +41,30 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @return Ban
43 43
      */
44
-    public function store(int $userId, int $userStaffId, string $banReason, $banType = 'account', $banExpire = 0, $ipAddress = '', $machineId = ''): Ban
45
-    {
46
-        $this->attributes['user_id'] = $userId;
47
-        $this->attributes['user_staff_id'] = $userStaffId;
48
-        $this->attributes['ban_reason'] = $banReason;
49
-        $this->attributes['ban_expire'] = $banExpire;
50
-        $this->attributes['timestamp'] = time();
51
-        $this->attributes['ip'] = $ipAddress;
52
-        $this->attributes['type'] = $banType;
53
-        $this->attributes['machine_id'] = $machineId;
54
-        $this->timestamps = false;
44
+     public function store(int $userId, int $userStaffId, string $banReason, $banType = 'account', $banExpire = 0, $ipAddress = '', $machineId = ''): Ban
45
+     {
46
+         $this->attributes['user_id'] = $userId;
47
+         $this->attributes['user_staff_id'] = $userStaffId;
48
+         $this->attributes['ban_reason'] = $banReason;
49
+         $this->attributes['ban_expire'] = $banExpire;
50
+         $this->attributes['timestamp'] = time();
51
+         $this->attributes['ip'] = $ipAddress;
52
+         $this->attributes['type'] = $banType;
53
+         $this->attributes['machine_id'] = $machineId;
54
+         $this->timestamps = false;
55 55
 
56
-        $this->save();
56
+         $this->save();
57 57
 
58
-        return $this;
59
-    }
58
+         return $this;
59
+     }
60 60
 
61
-    /**
61
+     /**
62 62
      * Get Ban Expire Attribute.
63 63
      *
64 64
      * @return string
65 65
      */
66
-    public function getBanExpireAttribute(): string
67
-    {
68
-        return date('M/d/Y h:m A', $this->attributes['ban_expire']);
69
-    }
66
+     public function getBanExpireAttribute(): string
67
+     {
68
+         return date('M/d/Y h:m A', $this->attributes['ban_expire']);
69
+     }
70 70
 }
Please login to merge, or discard this patch.
app/Models/TrustedDevice.php 1 patch
Switch Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@  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 TrustedDevice.
7 7
  */
8
-class TrustedDevice extends ChocolateyModel
9
-{
10
-    /**
8
+ class TrustedDevice 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_trusted';
22
+     protected $table = 'chocolatey_users_security_trusted';
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
 
31
-    /**
31
+     /**
32 32
      * The attributes excluded from the model's JSON form.
33 33
      *
34 34
      * @var array
35 35
      */
36
-    protected $hidden = ['id'];
36
+     protected $hidden = ['id'];
37 37
 
38
-    /**
38
+     /**
39 39
      * Store a new TrustedDevice.
40 40
      *
41 41
      * @param int    $userId
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * @return TrustedDevice
45 45
      */
46
-    public function store(int $userId, string $ipAddress): TrustedDevice
47
-    {
48
-        $this->attributes['user_id'] = $userId;
49
-        $this->attributes['ip_address'] = $ipAddress;
50
-        $this->timestamps = false;
46
+     public function store(int $userId, string $ipAddress): TrustedDevice
47
+     {
48
+         $this->attributes['user_id'] = $userId;
49
+         $this->attributes['ip_address'] = $ipAddress;
50
+         $this->timestamps = false;
51 51
 
52
-        $this->save();
52
+         $this->save();
53 53
 
54
-        return $this;
55
-    }
54
+         return $this;
55
+     }
56 56
 }
Please login to merge, or discard this patch.
app/Models/PhotoReport.php 1 patch
Switch Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,43 +1,43 @@  discard block
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5
-use Illuminate\Database\Eloquent\Builder;
5
+ use Illuminate\Database\Eloquent\Builder;
6 6
 
7 7
 /**
8 8
  * Class PhotoReport.
9 9
  */
10
-class PhotoReport extends ChocolateyModel
11
-{
12
-    /**
10
+ class PhotoReport extends ChocolateyModel
11
+ {
12
+     /**
13 13
      * Disable Timestamps.
14 14
      *
15 15
      * @var bool
16 16
      */
17
-    public $timestamps = false;
17
+     public $timestamps = false;
18 18
 
19
-    /**
19
+     /**
20 20
      * The table associated with the model.
21 21
      *
22 22
      * @var string
23 23
      */
24
-    protected $table = 'chocolatey_users_photos_reported';
24
+     protected $table = 'chocolatey_users_photos_reported';
25 25
 
26
-    /**
26
+     /**
27 27
      * Primary Key of the Table.
28 28
      *
29 29
      * @var string
30 30
      */
31
-    protected $primaryKey = 'id';
31
+     protected $primaryKey = 'id';
32 32
 
33
-    /**
33
+     /**
34 34
      * The Appender(s) of the Model.
35 35
      *
36 36
      * @var array
37 37
      */
38
-    protected $appends = ['reason_category'];
38
+     protected $appends = ['reason_category'];
39 39
 
40
-    /**
40
+     /**
41 41
      * Store a new Photo Report.
42 42
      *
43 43
      * @param int $photoId
@@ -46,26 +46,26 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @return PhotoReport
48 48
      */
49
-    public function store(int $photoId, int $reasonId, int $reportedBy): PhotoReport
50
-    {
51
-        $this->attributes['photo_id'] = $photoId;
52
-        $this->attributes['reason_id'] = $reasonId;
53
-        $this->attributes['reported_by'] = $reportedBy;
54
-        $this->attributes['approved'] = 0;
55
-        $this->timestamps = false;
49
+     public function store(int $photoId, int $reasonId, int $reportedBy): PhotoReport
50
+     {
51
+         $this->attributes['photo_id'] = $photoId;
52
+         $this->attributes['reason_id'] = $reasonId;
53
+         $this->attributes['reported_by'] = $reportedBy;
54
+         $this->attributes['approved'] = 0;
55
+         $this->timestamps = false;
56 56
 
57
-        $this->save();
57
+         $this->save();
58 58
 
59
-        return $this;
60
-    }
59
+         return $this;
60
+     }
61 61
 
62
-    /**
62
+     /**
63 63
      * Get the Report Category Content.
64 64
      *
65 65
      * @return Builder
66 66
      */
67
-    public function getReasonCategoryAttribute()
68
-    {
69
-        return PhotoReportCategory::query()->where('report_category', $this->attributes['reason_id'])->first();
70
-    }
67
+     public function getReasonCategoryAttribute()
68
+     {
69
+         return PhotoReportCategory::query()->where('report_category', $this->attributes['reason_id'])->first();
70
+     }
71 71
 }
Please login to merge, or discard this patch.
app/Models/PhotoLike.php 1 patch
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,34 +1,34 @@  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 PhotoLike.
7 7
  */
8
-class PhotoLike extends ChocolateyModel
9
-{
10
-    /**
8
+ class PhotoLike 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_photos_likes';
22
+     protected $table = 'chocolatey_users_photos_likes';
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
 
31
-    /**
31
+     /**
32 32
      * Store a new Photo Data.
33 33
      *
34 34
      * @param int    $photoId
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
      *
37 37
      * @return PhotoLike
38 38
      */
39
-    public function store(int $photoId, string $userName): PhotoLike
40
-    {
41
-        $this->attributes['photo_id'] = $photoId;
42
-        $this->attributes['username'] = $userName;
43
-        $this->timestamps = false;
39
+     public function store(int $photoId, string $userName): PhotoLike
40
+     {
41
+         $this->attributes['photo_id'] = $photoId;
42
+         $this->attributes['username'] = $userName;
43
+         $this->timestamps = false;
44 44
 
45
-        $this->save();
45
+         $this->save();
46 46
 
47
-        return $this;
48
-    }
47
+         return $this;
48
+     }
49 49
 }
Please login to merge, or discard this patch.
app/Models/PaymentCategory.php 1 patch
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,47 +1,47 @@
 block discarded – undo
1
-<?php
1
+ <?php
2 2
 
3
-namespace App\Models;
3
+ namespace App\Models;
4 4
 
5 5
 /**
6 6
  * Class PaymentCategory.
7 7
  */
8
-class PaymentCategory extends ChocolateyModel
9
-{
10
-    /**
8
+ class PaymentCategory 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_shop_payment_categories';
22
+     protected $table = 'chocolatey_shop_payment_categories';
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
 
31
-    /**
31
+     /**
32 32
      * Store an Shop Country.
33 33
      *
34 34
      * @param string $paymentName
35 35
      *
36 36
      * @return PaymentCategory
37 37
      */
38
-    public function store(string $paymentName): PaymentCategory
39
-    {
40
-        $this->attributes['payment_type'] = $paymentName;
41
-        $this->timestamps = false;
38
+     public function store(string $paymentName): PaymentCategory
39
+     {
40
+         $this->attributes['payment_type'] = $paymentName;
41
+         $this->timestamps = false;
42 42
 
43
-        $this->save();
43
+         $this->save();
44 44
 
45
-        return $this;
46
-    }
45
+         return $this;
46
+     }
47 47
 }
Please login to merge, or discard this patch.
app/Models/RoomItem.php 1 patch
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,34 +1,34 @@  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 RoomItem.
7 7
  */
8
-class RoomItem extends ChocolateyModel
9
-{
10
-    /**
8
+ class RoomItem 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 = 'items';
22
+     protected $table = 'items';
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
 
31
-    /**
31
+     /**
32 32
      * Store a RoomItem.
33 33
      *
34 34
      * @param int    $userId
@@ -43,24 +43,24 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * @return RoomItem
45 45
      */
46
-    public function store(int $userId, int $roomId, int $itemId, int $xPosition, int $yPosition, string $zPosition, int $rotation, string $extraData, string $wallPosition = ''): RoomItem
47
-    {
48
-        $this->attributes['user_id'] = $userId;
49
-        $this->attributes['room_id'] = $roomId;
50
-        $this->attributes['item_id'] = $itemId;
51
-        $this->attributes['x'] = $xPosition;
52
-        $this->attributes['y'] = $yPosition;
53
-        $this->attributes['z'] = $zPosition;
54
-        $this->attributes['rot'] = $rotation;
55
-        $this->attributes['extra_data'] = $extraData;
56
-        $this->timestamps = false;
46
+     public function store(int $userId, int $roomId, int $itemId, int $xPosition, int $yPosition, string $zPosition, int $rotation, string $extraData, string $wallPosition = ''): RoomItem
47
+     {
48
+         $this->attributes['user_id'] = $userId;
49
+         $this->attributes['room_id'] = $roomId;
50
+         $this->attributes['item_id'] = $itemId;
51
+         $this->attributes['x'] = $xPosition;
52
+         $this->attributes['y'] = $yPosition;
53
+         $this->attributes['z'] = $zPosition;
54
+         $this->attributes['rot'] = $rotation;
55
+         $this->attributes['extra_data'] = $extraData;
56
+         $this->timestamps = false;
57 57
 
58
-        if (!empty($wallPosition)) {
59
-            $this->attributes['wall_pos'] = $wallPosition;
60
-        }
58
+         if (!empty($wallPosition)) {
59
+             $this->attributes['wall_pos'] = $wallPosition;
60
+         }
61 61
 
62
-        $this->save();
62
+         $this->save();
63 63
 
64
-        return $this;
65
-    }
64
+         return $this;
65
+     }
66 66
 }
Please login to merge, or discard this patch.