@@ -26,7 +26,6 @@ |
||
26 | 26 | use Closure; |
27 | 27 | use Auth; |
28 | 28 | use Pterodactyl\Models\Server; |
29 | -use Debugbar; |
|
30 | 29 | |
31 | 30 | class CheckServer |
32 | 31 | { |
@@ -23,7 +23,6 @@ |
||
23 | 23 | */ |
24 | 24 | namespace Pterodactyl\Http\Routes; |
25 | 25 | |
26 | -use Pterodactyl\Models; |
|
27 | 26 | use Illuminate\Routing\Router; |
28 | 27 | |
29 | 28 | class APIRoutes |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function map(Router $router) { |
33 | 33 | |
34 | 34 | $api = app('Dingo\Api\Routing\Router'); |
35 | - $api->version('v1', ['prefix' => 'api/me', 'middleware' => 'api.auth'], function ($api) { |
|
35 | + $api->version('v1', ['prefix' => 'api/me', 'middleware' => 'api.auth'], function($api) { |
|
36 | 36 | $api->get('/', [ |
37 | 37 | 'as' => 'api.user.me', |
38 | 38 | 'uses' => 'Pterodactyl\Http\Controllers\API\User\InfoController@me' |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ]); |
50 | 50 | }); |
51 | 51 | |
52 | - $api->version('v1', ['prefix' => 'api', 'middleware' => 'api.auth'], function ($api) { |
|
52 | + $api->version('v1', ['prefix' => 'api', 'middleware' => 'api.auth'], function($api) { |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * User Routes |
@@ -46,7 +46,6 @@ |
||
46 | 46 | /** |
47 | 47 | * Create a new job instance. |
48 | 48 | * |
49 | - * @param integer $server |
|
50 | 49 | * @return void |
51 | 50 | */ |
52 | 51 | public function __construct($id) |
@@ -23,14 +23,9 @@ |
||
23 | 23 | */ |
24 | 24 | namespace Pterodactyl\Jobs; |
25 | 25 | |
26 | -use DB; |
|
27 | - |
|
28 | -use Illuminate\Bus\Queueable; |
|
29 | 26 | use Illuminate\Queue\SerializesModels; |
30 | 27 | use Illuminate\Queue\InteractsWithQueue; |
31 | 28 | use Illuminate\Contracts\Queue\ShouldQueue; |
32 | - |
|
33 | -use Pterodactyl\Models; |
|
34 | 29 | use Pterodactyl\Repositories\ServerRepository; |
35 | 30 | |
36 | 31 | class DeleteServer extends Job implements ShouldQueue |
@@ -27,8 +27,6 @@ |
||
27 | 27 | use Illuminate\Queue\SerializesModels; |
28 | 28 | use Illuminate\Queue\InteractsWithQueue; |
29 | 29 | use Illuminate\Contracts\Queue\ShouldQueue; |
30 | - |
|
31 | -use DB; |
|
32 | 30 | use Carbon; |
33 | 31 | use Cron; |
34 | 32 | use Pterodactyl\Models; |
@@ -23,12 +23,9 @@ |
||
23 | 23 | */ |
24 | 24 | namespace Pterodactyl\Jobs; |
25 | 25 | |
26 | -use Debugbar; |
|
27 | -use Illuminate\Bus\Queueable; |
|
28 | 26 | use Illuminate\Queue\SerializesModels; |
29 | 27 | use Illuminate\Queue\InteractsWithQueue; |
30 | 28 | use Illuminate\Contracts\Queue\ShouldQueue; |
31 | - |
|
32 | 29 | use Pterodactyl\Repositories\ServerRepository; |
33 | 30 | |
34 | 31 | class SuspendServer extends Job implements ShouldQueue |
@@ -49,7 +49,7 @@ |
||
49 | 49 | /** |
50 | 50 | * Handle the event. |
51 | 51 | * |
52 | - * @param DeleteServerEvent $event |
|
52 | + * @param ServerDeleted $event |
|
53 | 53 | * @return void |
54 | 54 | */ |
55 | 55 | public function handle(ServerDeleted $event) |
@@ -24,10 +24,8 @@ |
||
24 | 24 | namespace Pterodactyl\Listeners; |
25 | 25 | |
26 | 26 | use Carbon; |
27 | - |
|
28 | 27 | use Pterodactyl\Events\ServerDeleted; |
29 | 28 | use Illuminate\Foundation\Bus\DispatchesJobs; |
30 | - |
|
31 | 29 | use Pterodactyl\Jobs\SuspendServer; |
32 | 30 | use Pterodactyl\Jobs\DeleteServer; |
33 | 31 |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * Determine if we need to change the server's daemonSecret value to |
108 | 108 | * match that of the user if they are a subuser. |
109 | 109 | * |
110 | - * @param Illuminate\Database\Eloquent\Model\Server $server |
|
110 | + * @param Server $server |
|
111 | 111 | * @return string |
112 | 112 | */ |
113 | 113 | public static function getUserDaemonSecret(Server $server) |
@@ -131,6 +131,7 @@ discard block |
||
131 | 131 | * Returns array of all servers owned by the logged in user. |
132 | 132 | * Returns all users servers if user is a root admin. |
133 | 133 | * |
134 | + * @param integer $paginate |
|
134 | 135 | * @return \Illuminate\Database\Eloquent\Collection |
135 | 136 | */ |
136 | 137 | public static function getUserServers($paginate = null) |
@@ -28,8 +28,6 @@ |
||
28 | 28 | use Illuminate\Database\Eloquent\Model; |
29 | 29 | use Illuminate\Database\Eloquent\SoftDeletes; |
30 | 30 | |
31 | -use Pterodactyl\Exceptions\DisplayException; |
|
32 | - |
|
33 | 31 | class Server extends Model |
34 | 32 | { |
35 | 33 |
@@ -68,21 +68,21 @@ |
||
68 | 68 | * |
69 | 69 | * @var array |
70 | 70 | */ |
71 | - protected $casts = [ |
|
72 | - 'node' => 'integer', |
|
73 | - 'suspended' => 'integer', |
|
74 | - 'owner' => 'integer', |
|
75 | - 'memory' => 'integer', |
|
76 | - 'swap' => 'integer', |
|
77 | - 'disk' => 'integer', |
|
78 | - 'io' => 'integer', |
|
79 | - 'cpu' => 'integer', |
|
80 | - 'oom_disabled' => 'integer', |
|
81 | - 'port' => 'integer', |
|
82 | - 'service' => 'integer', |
|
83 | - 'option' => 'integer', |
|
84 | - 'installed' => 'integer', |
|
85 | - ]; |
|
71 | + protected $casts = [ |
|
72 | + 'node' => 'integer', |
|
73 | + 'suspended' => 'integer', |
|
74 | + 'owner' => 'integer', |
|
75 | + 'memory' => 'integer', |
|
76 | + 'swap' => 'integer', |
|
77 | + 'disk' => 'integer', |
|
78 | + 'io' => 'integer', |
|
79 | + 'cpu' => 'integer', |
|
80 | + 'oom_disabled' => 'integer', |
|
81 | + 'port' => 'integer', |
|
82 | + 'service' => 'integer', |
|
83 | + 'option' => 'integer', |
|
84 | + 'installed' => 'integer', |
|
85 | + ]; |
|
86 | 86 | |
87 | 87 | /** |
88 | 88 | * @var array |
@@ -189,7 +189,7 @@ |
||
189 | 189 | |
190 | 190 | $result = $query->first(); |
191 | 191 | |
192 | - if(!is_null($result)) { |
|
192 | + if (!is_null($result)) { |
|
193 | 193 | $result->daemonSecret = self::getUserDaemonSecret($result); |
194 | 194 | } |
195 | 195 |
@@ -25,11 +25,9 @@ |
||
25 | 25 | |
26 | 26 | use Hash; |
27 | 27 | use Google2FA; |
28 | -use Pterodactyl\Exceptions\AccountNotFoundException; |
|
29 | 28 | use Pterodactyl\Exceptions\DisplayException; |
30 | 29 | use Pterodactyl\Models\Permission; |
31 | 30 | use Pterodactyl\Notifications\SendPasswordReset as ResetPasswordNotification; |
32 | - |
|
33 | 31 | use Illuminate\Auth\Authenticatable; |
34 | 32 | use Illuminate\Notifications\Notifiable; |
35 | 33 | use Illuminate\Database\Eloquent\Model; |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | * |
65 | 65 | * @var array |
66 | 66 | */ |
67 | - protected $casts = [ |
|
68 | - 'root_admin' => 'integer', |
|
69 | - 'use_totp' => 'integer', |
|
70 | - ]; |
|
67 | + protected $casts = [ |
|
68 | + 'root_admin' => 'integer', |
|
69 | + 'use_totp' => 'integer', |
|
70 | + ]; |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * The attributes excluded from the model's JSON form. |
@@ -77,10 +77,10 @@ discard block |
||
77 | 77 | protected $hidden = ['password', 'remember_token', 'totp_secret']; |
78 | 78 | |
79 | 79 | /** |
80 | - * The rules for user passwords |
|
81 | - * |
|
82 | - * @var string |
|
83 | - */ |
|
80 | + * The rules for user passwords |
|
81 | + * |
|
82 | + * @var string |
|
83 | + */ |
|
84 | 84 | const PASSWORD_RULES = 'min:8|regex:((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,})'; |
85 | 85 | |
86 | 86 | public function permissions() |
@@ -42,6 +42,7 @@ discard block |
||
42 | 42 | /** |
43 | 43 | * Create a new notification instance. |
44 | 44 | * |
45 | + * @param string $token |
|
45 | 46 | * @return void |
46 | 47 | */ |
47 | 48 | public function __construct($token) |
@@ -53,7 +54,7 @@ discard block |
||
53 | 54 | * Get the notification's delivery channels. |
54 | 55 | * |
55 | 56 | * @param mixed $notifiable |
56 | - * @return array |
|
57 | + * @return string[] |
|
57 | 58 | */ |
58 | 59 | public function via($notifiable) |
59 | 60 | { |