@@ -28,7 +28,7 @@ |
||
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 | }); |
@@ -65,7 +65,7 @@ |
||
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 | */ |
@@ -1,41 +1,41 @@ discard block |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | |
3 | -namespace App\Helpers; |
|
3 | + namespace App\Helpers; |
|
4 | 4 | |
5 | -use App\Singleton; |
|
5 | + use App\Singleton; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * Class Session. |
9 | 9 | */ |
10 | -final class Session extends Singleton |
|
11 | -{ |
|
12 | - /** |
|
10 | + final class Session extends Singleton |
|
11 | + { |
|
12 | + /** |
|
13 | 13 | * Rename the Session ID. |
14 | 14 | * |
15 | 15 | * @param string $name |
16 | 16 | */ |
17 | - public function rename($name) |
|
18 | - { |
|
19 | - session_name($name); |
|
20 | - } |
|
17 | + public function rename($name) |
|
18 | + { |
|
19 | + session_name($name); |
|
20 | + } |
|
21 | 21 | |
22 | - /** |
|
22 | + /** |
|
23 | 23 | * Start Session Handler. |
24 | 24 | */ |
25 | - public function start() |
|
26 | - { |
|
27 | - @session_start(); |
|
28 | - } |
|
25 | + public function start() |
|
26 | + { |
|
27 | + @session_start(); |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
30 | + /** |
|
31 | 31 | * Stop Session Handler. |
32 | 32 | */ |
33 | - public function destroy() |
|
34 | - { |
|
35 | - @session_destroy(); |
|
36 | - } |
|
33 | + public function destroy() |
|
34 | + { |
|
35 | + @session_destroy(); |
|
36 | + } |
|
37 | 37 | |
38 | - /** |
|
38 | + /** |
|
39 | 39 | * Store a Variable in the Session. |
40 | 40 | * |
41 | 41 | * @param string $key |
@@ -43,46 +43,46 @@ discard block |
||
43 | 43 | * |
44 | 44 | * @return mixed |
45 | 45 | */ |
46 | - public function set($key, $value) |
|
47 | - { |
|
48 | - $_SESSION[$key] = $value; |
|
46 | + public function set($key, $value) |
|
47 | + { |
|
48 | + $_SESSION[$key] = $value; |
|
49 | 49 | |
50 | - return $value; |
|
51 | - } |
|
50 | + return $value; |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
53 | + /** |
|
54 | 54 | * Get a Attribute Value from Session. |
55 | 55 | * |
56 | 56 | * @param string $key |
57 | 57 | * |
58 | 58 | * @return mixed |
59 | 59 | */ |
60 | - public function get($key) |
|
61 | - { |
|
62 | - return $this->has($key) ? $_SESSION[$key] : null; |
|
63 | - } |
|
60 | + public function get($key) |
|
61 | + { |
|
62 | + return $this->has($key) ? $_SESSION[$key] : null; |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
65 | + /** |
|
66 | 66 | * Check if a Key exists in the Session. |
67 | 67 | * |
68 | 68 | * @param mixed $key |
69 | 69 | * |
70 | 70 | * @return bool |
71 | 71 | */ |
72 | - public function has($key) |
|
73 | - { |
|
74 | - return array_key_exists($key, $_SESSION); |
|
75 | - } |
|
72 | + public function has($key) |
|
73 | + { |
|
74 | + return array_key_exists($key, $_SESSION); |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
77 | + /** |
|
78 | 78 | * Erase a Attribute from Session. |
79 | 79 | * |
80 | 80 | * @param string $key |
81 | 81 | */ |
82 | - public function erase($key) |
|
83 | - { |
|
84 | - $_SESSION[$key] = null; |
|
82 | + public function erase($key) |
|
83 | + { |
|
84 | + $_SESSION[$key] = null; |
|
85 | 85 | |
86 | - unset($_SESSION[$key]); |
|
87 | - } |
|
86 | + unset($_SESSION[$key]); |
|
87 | + } |
|
88 | 88 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | return; |
25 | 25 | } |
26 | 26 | |
27 | - Mail::send($view, $configuration, function ($message) use ($configuration) { |
|
27 | + Mail::send($view, $configuration, function($message) use ($configuration) { |
|
28 | 28 | $message->from(Config::get('mail.from.address'), Config::get('mail.from.name')); |
29 | 29 | $message->to($configuration['email'])->subject($configuration['subject']); |
30 | 30 | }); |
@@ -1,9 +1,9 @@ |
||
1 | -<?php |
|
1 | + <?php |
|
2 | 2 | |
3 | -namespace App\Helpers; |
|
3 | + namespace App\Helpers; |
|
4 | 4 | |
5 | -/* Avoids CloudFlare IP to be logged as users IP */ |
|
5 | + /* Avoids CloudFlare IP to be logged as users IP */ |
|
6 | 6 | |
7 | -if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { |
|
8 | - $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; |
|
7 | + if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) { |
|
8 | + $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; |
|
9 | 9 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | Storage::put('.env', 'APP_ENV=production'); |
69 | 69 | |
70 | 70 | $this->comment('[INFO] Generating Chocolatey encryption key for password hashing...'); |
71 | - Storage::append('.env', 'APP_KEY='.bin2hex(openssl_random_pseudo_bytes(20))); |
|
71 | + Storage::append('.env', 'APP_KEY=' . bin2hex(openssl_random_pseudo_bytes(20))); |
|
72 | 72 | |
73 | 73 | $this->comment('[INFO] Setting Chocolatey debug mode to false...'); |
74 | 74 | Storage::append('.env', 'APP_DEBUG=false'); |
@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | Storage::append('.env', 'DB_CONNECTION=mysql'); |
81 | 81 | |
82 | 82 | $this->comment('[INFO] Appending all database credentials to .env file...'); |
83 | - Storage::append('.env', 'DB_HOST='.$DB_HOST); |
|
84 | - Storage::append('.env', 'DB_PORT='.$DB_PORT); |
|
85 | - Storage::append('.env', 'DB_DATABASE='.$DB_NAME); |
|
86 | - Storage::append('.env', 'DB_USERNAME='.$DB_USER); |
|
87 | - Storage::append('.env', 'DB_PASSWORD='.$DB_PASS); |
|
83 | + Storage::append('.env', 'DB_HOST=' . $DB_HOST); |
|
84 | + Storage::append('.env', 'DB_PORT=' . $DB_PORT); |
|
85 | + Storage::append('.env', 'DB_DATABASE=' . $DB_NAME); |
|
86 | + Storage::append('.env', 'DB_USERNAME=' . $DB_USER); |
|
87 | + Storage::append('.env', 'DB_PASSWORD=' . $DB_PASS); |
|
88 | 88 | Storage::append('.env', ''); |
89 | 89 | |
90 | 90 | $this->comment('[DRIVERS] Setting broadcast to log...'); |