Update phpstan
This commit is contained in:
parent
b9016aa25e
commit
afd0a8f768
20 changed files with 307 additions and 175 deletions
|
@ -50,6 +50,11 @@ class AppSettingsCommand extends Command
|
||||||
*/
|
*/
|
||||||
protected $config;
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \Illuminate\Validation\Factory
|
||||||
|
*/
|
||||||
|
protected $validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,8 +17,6 @@ class Installed extends Event
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
|
||||||
* @var \Pterodactyl\Models\Server
|
|
||||||
*/
|
*/
|
||||||
public function __construct(Server $server)
|
public function __construct(Server $server)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Handler extends ExceptionHandler
|
||||||
/**
|
/**
|
||||||
* A list of the exception types that should not be reported.
|
* A list of the exception types that should not be reported.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
protected $dontReport = [
|
protected $dontReport = [
|
||||||
AuthenticationException::class,
|
AuthenticationException::class,
|
||||||
|
@ -51,7 +51,7 @@ class Handler extends ExceptionHandler
|
||||||
/**
|
/**
|
||||||
* A list of the inputs that are never flashed for validation exceptions.
|
* A list of the inputs that are never flashed for validation exceptions.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
protected $dontFlash = [
|
protected $dontFlash = [
|
||||||
'token',
|
'token',
|
||||||
|
|
|
@ -9,7 +9,6 @@ use Spatie\QueryBuilder\QueryBuilder;
|
||||||
use Pterodactyl\Services\Nodes\NodeUpdateService;
|
use Pterodactyl\Services\Nodes\NodeUpdateService;
|
||||||
use Pterodactyl\Services\Nodes\NodeCreationService;
|
use Pterodactyl\Services\Nodes\NodeCreationService;
|
||||||
use Pterodactyl\Services\Nodes\NodeDeletionService;
|
use Pterodactyl\Services\Nodes\NodeDeletionService;
|
||||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
|
||||||
use Pterodactyl\Transformers\Api\Application\NodeTransformer;
|
use Pterodactyl\Transformers\Api\Application\NodeTransformer;
|
||||||
use Pterodactyl\Exceptions\Http\QueryValueOutOfRangeHttpException;
|
use Pterodactyl\Exceptions\Http\QueryValueOutOfRangeHttpException;
|
||||||
use Pterodactyl\Http\Requests\Api\Application\Nodes\GetNodeRequest;
|
use Pterodactyl\Http\Requests\Api\Application\Nodes\GetNodeRequest;
|
||||||
|
@ -21,7 +20,6 @@ use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
||||||
|
|
||||||
class NodeController extends ApplicationApiController
|
class NodeController extends ApplicationApiController
|
||||||
{
|
{
|
||||||
private NodeRepositoryInterface $repository;
|
|
||||||
private NodeCreationService $creationService;
|
private NodeCreationService $creationService;
|
||||||
private NodeDeletionService $deletionService;
|
private NodeDeletionService $deletionService;
|
||||||
private NodeUpdateService $updateService;
|
private NodeUpdateService $updateService;
|
||||||
|
@ -30,14 +28,12 @@ class NodeController extends ApplicationApiController
|
||||||
* NodeController constructor.
|
* NodeController constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
NodeRepositoryInterface $repository,
|
|
||||||
NodeCreationService $creationService,
|
NodeCreationService $creationService,
|
||||||
NodeDeletionService $deletionService,
|
NodeDeletionService $deletionService,
|
||||||
NodeUpdateService $updateService
|
NodeUpdateService $updateService
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->repository = $repository;
|
|
||||||
$this->creationService = $creationService;
|
$this->creationService = $creationService;
|
||||||
$this->deletionService = $deletionService;
|
$this->deletionService = $deletionService;
|
||||||
$this->updateService = $updateService;
|
$this->updateService = $updateService;
|
||||||
|
|
|
@ -8,7 +8,6 @@ use Pterodactyl\Models\Database;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Pterodactyl\Services\Databases\DatabasePasswordService;
|
use Pterodactyl\Services\Databases\DatabasePasswordService;
|
||||||
use Pterodactyl\Services\Databases\DatabaseManagementService;
|
use Pterodactyl\Services\Databases\DatabaseManagementService;
|
||||||
use Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface;
|
|
||||||
use Pterodactyl\Transformers\Api\Application\ServerDatabaseTransformer;
|
use Pterodactyl\Transformers\Api\Application\ServerDatabaseTransformer;
|
||||||
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
||||||
use Pterodactyl\Http\Requests\Api\Application\Servers\Databases\GetServerDatabaseRequest;
|
use Pterodactyl\Http\Requests\Api\Application\Servers\Databases\GetServerDatabaseRequest;
|
||||||
|
@ -20,21 +19,18 @@ class DatabaseController extends ApplicationApiController
|
||||||
{
|
{
|
||||||
private DatabaseManagementService $databaseManagementService;
|
private DatabaseManagementService $databaseManagementService;
|
||||||
private DatabasePasswordService $databasePasswordService;
|
private DatabasePasswordService $databasePasswordService;
|
||||||
private DatabaseRepositoryInterface $repository;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DatabaseController constructor.
|
* DatabaseController constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
DatabaseManagementService $databaseManagementService,
|
DatabaseManagementService $databaseManagementService,
|
||||||
DatabasePasswordService $databasePasswordService,
|
DatabasePasswordService $databasePasswordService
|
||||||
DatabaseRepositoryInterface $repository
|
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->databaseManagementService = $databaseManagementService;
|
$this->databaseManagementService = $databaseManagementService;
|
||||||
$this->databasePasswordService = $databasePasswordService;
|
$this->databasePasswordService = $databasePasswordService;
|
||||||
$this->repository = $repository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,7 +9,6 @@ use Spatie\QueryBuilder\QueryBuilder;
|
||||||
use Pterodactyl\Services\Users\UserUpdateService;
|
use Pterodactyl\Services\Users\UserUpdateService;
|
||||||
use Pterodactyl\Services\Users\UserCreationService;
|
use Pterodactyl\Services\Users\UserCreationService;
|
||||||
use Pterodactyl\Services\Users\UserDeletionService;
|
use Pterodactyl\Services\Users\UserDeletionService;
|
||||||
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
|
|
||||||
use Pterodactyl\Transformers\Api\Application\UserTransformer;
|
use Pterodactyl\Transformers\Api\Application\UserTransformer;
|
||||||
use Pterodactyl\Exceptions\Http\QueryValueOutOfRangeHttpException;
|
use Pterodactyl\Exceptions\Http\QueryValueOutOfRangeHttpException;
|
||||||
use Pterodactyl\Http\Requests\Api\Application\Users\GetUserRequest;
|
use Pterodactyl\Http\Requests\Api\Application\Users\GetUserRequest;
|
||||||
|
@ -21,7 +20,6 @@ use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
|
||||||
|
|
||||||
class UserController extends ApplicationApiController
|
class UserController extends ApplicationApiController
|
||||||
{
|
{
|
||||||
private UserRepositoryInterface $repository;
|
|
||||||
private UserCreationService $creationService;
|
private UserCreationService $creationService;
|
||||||
private UserDeletionService $deletionService;
|
private UserDeletionService $deletionService;
|
||||||
private UserUpdateService $updateService;
|
private UserUpdateService $updateService;
|
||||||
|
@ -30,14 +28,12 @@ class UserController extends ApplicationApiController
|
||||||
* UserController constructor.
|
* UserController constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
UserRepositoryInterface $repository,
|
|
||||||
UserCreationService $creationService,
|
UserCreationService $creationService,
|
||||||
UserDeletionService $deletionService,
|
UserDeletionService $deletionService,
|
||||||
UserUpdateService $updateService
|
UserUpdateService $updateService
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->repository = $repository;
|
|
||||||
$this->creationService = $creationService;
|
$this->creationService = $creationService;
|
||||||
$this->deletionService = $deletionService;
|
$this->deletionService = $deletionService;
|
||||||
$this->updateService = $updateService;
|
$this->updateService = $updateService;
|
||||||
|
|
|
@ -7,24 +7,11 @@ use Pterodactyl\Models\Permission;
|
||||||
use Spatie\QueryBuilder\QueryBuilder;
|
use Spatie\QueryBuilder\QueryBuilder;
|
||||||
use Spatie\QueryBuilder\AllowedFilter;
|
use Spatie\QueryBuilder\AllowedFilter;
|
||||||
use Pterodactyl\Models\Filters\MultiFieldServerFilter;
|
use Pterodactyl\Models\Filters\MultiFieldServerFilter;
|
||||||
use Pterodactyl\Repositories\Eloquent\ServerRepository;
|
|
||||||
use Pterodactyl\Transformers\Api\Client\ServerTransformer;
|
use Pterodactyl\Transformers\Api\Client\ServerTransformer;
|
||||||
use Pterodactyl\Http\Requests\Api\Client\GetServersRequest;
|
use Pterodactyl\Http\Requests\Api\Client\GetServersRequest;
|
||||||
|
|
||||||
class ClientController extends ClientApiController
|
class ClientController extends ClientApiController
|
||||||
{
|
{
|
||||||
private ServerRepository $repository;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ClientController constructor.
|
|
||||||
*/
|
|
||||||
public function __construct(ServerRepository $repository)
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
|
|
||||||
$this->repository = $repository;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all of the servers available to the client making the API
|
* Return all of the servers available to the client making the API
|
||||||
* request, including servers the user has access to as a subuser.
|
* request, including servers the user has access to as a subuser.
|
||||||
|
|
|
@ -5,7 +5,6 @@ namespace Pterodactyl\Http\Controllers\Api\Client\Servers;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
use Pterodactyl\Models\Database;
|
use Pterodactyl\Models\Database;
|
||||||
use Pterodactyl\Repositories\Eloquent\DatabaseRepository;
|
|
||||||
use Pterodactyl\Services\Databases\DatabasePasswordService;
|
use Pterodactyl\Services\Databases\DatabasePasswordService;
|
||||||
use Pterodactyl\Transformers\Api\Client\DatabaseTransformer;
|
use Pterodactyl\Transformers\Api\Client\DatabaseTransformer;
|
||||||
use Pterodactyl\Services\Databases\DatabaseManagementService;
|
use Pterodactyl\Services\Databases\DatabaseManagementService;
|
||||||
|
@ -19,7 +18,6 @@ use Pterodactyl\Http\Requests\Api\Client\Servers\Databases\RotatePasswordRequest
|
||||||
class DatabaseController extends ClientApiController
|
class DatabaseController extends ClientApiController
|
||||||
{
|
{
|
||||||
private DeployServerDatabaseService $deployDatabaseService;
|
private DeployServerDatabaseService $deployDatabaseService;
|
||||||
private DatabaseRepository $repository;
|
|
||||||
private DatabaseManagementService $managementService;
|
private DatabaseManagementService $managementService;
|
||||||
private DatabasePasswordService $passwordService;
|
private DatabasePasswordService $passwordService;
|
||||||
|
|
||||||
|
@ -29,13 +27,11 @@ class DatabaseController extends ClientApiController
|
||||||
public function __construct(
|
public function __construct(
|
||||||
DatabaseManagementService $managementService,
|
DatabaseManagementService $managementService,
|
||||||
DatabasePasswordService $passwordService,
|
DatabasePasswordService $passwordService,
|
||||||
DatabaseRepository $repository,
|
|
||||||
DeployServerDatabaseService $deployDatabaseService
|
DeployServerDatabaseService $deployDatabaseService
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->deployDatabaseService = $deployDatabaseService;
|
$this->deployDatabaseService = $deployDatabaseService;
|
||||||
$this->repository = $repository;
|
|
||||||
$this->managementService = $managementService;
|
$this->managementService = $managementService;
|
||||||
$this->passwordService = $passwordService;
|
$this->passwordService = $passwordService;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ use Illuminate\Http\Response;
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
use Pterodactyl\Models\AuditLog;
|
use Pterodactyl\Models\AuditLog;
|
||||||
use Pterodactyl\Services\Nodes\NodeJWTService;
|
use Pterodactyl\Services\Nodes\NodeJWTService;
|
||||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
|
||||||
use Pterodactyl\Repositories\Wings\DaemonFileRepository;
|
use Pterodactyl\Repositories\Wings\DaemonFileRepository;
|
||||||
use Pterodactyl\Transformers\Daemon\FileObjectTransformer;
|
use Pterodactyl\Transformers\Daemon\FileObjectTransformer;
|
||||||
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;
|
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;
|
||||||
|
@ -26,7 +25,6 @@ use Pterodactyl\Http\Requests\Api\Client\Servers\Files\WriteFileContentRequest;
|
||||||
class FileController extends ClientApiController
|
class FileController extends ClientApiController
|
||||||
{
|
{
|
||||||
private DaemonFileRepository $fileRepository;
|
private DaemonFileRepository $fileRepository;
|
||||||
private ResponseFactory $responseFactory;
|
|
||||||
private NodeJWTService $jwtService;
|
private NodeJWTService $jwtService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,13 +32,11 @@ class FileController extends ClientApiController
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
DaemonFileRepository $fileRepository,
|
DaemonFileRepository $fileRepository,
|
||||||
ResponseFactory $responseFactory,
|
|
||||||
NodeJWTService $jwtService
|
NodeJWTService $jwtService
|
||||||
) {
|
) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->fileRepository = $fileRepository;
|
$this->fileRepository = $fileRepository;
|
||||||
$this->responseFactory = $responseFactory;
|
|
||||||
$this->jwtService = $jwtService;
|
$this->jwtService = $jwtService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
namespace Pterodactyl\Http\Controllers\Api\Client\Servers;
|
namespace Pterodactyl\Http\Controllers\Api\Client\Servers;
|
||||||
|
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
use Pterodactyl\Repositories\Eloquent\SubuserRepository;
|
|
||||||
use Pterodactyl\Transformers\Api\Client\ServerTransformer;
|
use Pterodactyl\Transformers\Api\Client\ServerTransformer;
|
||||||
use Pterodactyl\Services\Servers\GetUserPermissionsService;
|
use Pterodactyl\Services\Servers\GetUserPermissionsService;
|
||||||
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;
|
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;
|
||||||
|
@ -11,17 +10,15 @@ use Pterodactyl\Http\Requests\Api\Client\Servers\GetServerRequest;
|
||||||
|
|
||||||
class ServerController extends ClientApiController
|
class ServerController extends ClientApiController
|
||||||
{
|
{
|
||||||
private SubuserRepository $repository;
|
|
||||||
private GetUserPermissionsService $permissionsService;
|
private GetUserPermissionsService $permissionsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ServerController constructor.
|
* ServerController constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(GetUserPermissionsService $permissionsService, SubuserRepository $repository)
|
public function __construct(GetUserPermissionsService $permissionsService)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->repository = $repository;
|
|
||||||
$this->permissionsService = $permissionsService;
|
$this->permissionsService = $permissionsService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace Pterodactyl\Http\Controllers\Api\Client\Servers;
|
||||||
|
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
use Pterodactyl\Services\Servers\StartupCommandService;
|
use Pterodactyl\Services\Servers\StartupCommandService;
|
||||||
use Pterodactyl\Services\Servers\VariableValidatorService;
|
|
||||||
use Pterodactyl\Repositories\Eloquent\ServerVariableRepository;
|
use Pterodactyl\Repositories\Eloquent\ServerVariableRepository;
|
||||||
use Pterodactyl\Transformers\Api\Client\EggVariableTransformer;
|
use Pterodactyl\Transformers\Api\Client\EggVariableTransformer;
|
||||||
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;
|
use Pterodactyl\Http\Controllers\Api\Client\ClientApiController;
|
||||||
|
@ -14,18 +13,16 @@ use Pterodactyl\Http\Requests\Api\Client\Servers\Startup\UpdateStartupVariableRe
|
||||||
|
|
||||||
class StartupController extends ClientApiController
|
class StartupController extends ClientApiController
|
||||||
{
|
{
|
||||||
private VariableValidatorService $service;
|
|
||||||
private ServerVariableRepository $repository;
|
private ServerVariableRepository $repository;
|
||||||
private StartupCommandService $startupCommandService;
|
private StartupCommandService $startupCommandService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* StartupController constructor.
|
* StartupController constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(VariableValidatorService $service, StartupCommandService $startupCommandService, ServerVariableRepository $repository)
|
public function __construct(StartupCommandService $startupCommandService, ServerVariableRepository $repository)
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->service = $service;
|
|
||||||
$this->repository = $repository;
|
$this->repository = $repository;
|
||||||
$this->startupCommandService = $startupCommandService;
|
$this->startupCommandService = $startupCommandService;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ class EggConfigurationService
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function replacePlaceholders(Server $server, object $configs)
|
protected function replacePlaceholders(Server $server, iterable $configs)
|
||||||
{
|
{
|
||||||
// Get the legacy configuration structure for the server so that we
|
// Get the legacy configuration structure for the server so that we
|
||||||
// can property map the egg placeholders to values.
|
// can property map the egg placeholders to values.
|
||||||
|
@ -112,6 +112,7 @@ class EggConfigurationService
|
||||||
|
|
||||||
foreach ($this->iterate($data->find, $structure) as $find => $replace) {
|
foreach ($this->iterate($data->find, $structure) as $find => $replace) {
|
||||||
if (is_object($replace)) {
|
if (is_object($replace)) {
|
||||||
|
// @phpstan-ignore-next-line
|
||||||
foreach ($replace as $match => $replaceWith) {
|
foreach ($replace as $match => $replaceWith) {
|
||||||
$append['replace'][] = [
|
$append['replace'][] = [
|
||||||
'match' => $find,
|
'match' => $find,
|
||||||
|
@ -205,7 +206,6 @@ class EggConfigurationService
|
||||||
// Replace anything starting with "server." with the value out of the server configuration
|
// Replace anything starting with "server." with the value out of the server configuration
|
||||||
// array that used to be created for the old daemon.
|
// array that used to be created for the old daemon.
|
||||||
if (Str::startsWith($key, 'server.')) {
|
if (Str::startsWith($key, 'server.')) {
|
||||||
// @phpstan-ignore-next-line
|
|
||||||
$plucked = Arr::get($structure, preg_replace('/^server\./', '', $key), '');
|
$plucked = Arr::get($structure, preg_replace('/^server\./', '', $key), '');
|
||||||
|
|
||||||
$value = str_replace("{{{$key}}}", $plucked, $value);
|
$value = str_replace("{{{$key}}}", $plucked, $value);
|
||||||
|
@ -216,7 +216,6 @@ class EggConfigurationService
|
||||||
// variable from the server configuration.
|
// variable from the server configuration.
|
||||||
$plucked = Arr::get(
|
$plucked = Arr::get(
|
||||||
$structure,
|
$structure,
|
||||||
// @phpstan-ignore-next-line
|
|
||||||
preg_replace('/^env\./', 'build.env.', $key),
|
preg_replace('/^env\./', 'build.env.', $key),
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace Pterodactyl\Services\Helpers;
|
||||||
|
|
||||||
use Illuminate\Support\Arr;
|
use Illuminate\Support\Arr;
|
||||||
use Illuminate\Filesystem\FilesystemManager;
|
use Illuminate\Filesystem\FilesystemManager;
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
|
|
||||||
class AssetHashService
|
class AssetHashService
|
||||||
{
|
{
|
||||||
|
@ -18,11 +17,6 @@ class AssetHashService
|
||||||
*/
|
*/
|
||||||
private $filesystem;
|
private $filesystem;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \Illuminate\Contracts\Foundation\Application
|
|
||||||
*/
|
|
||||||
private $application;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array|null
|
* @var array|null
|
||||||
*/
|
*/
|
||||||
|
@ -31,9 +25,8 @@ class AssetHashService
|
||||||
/**
|
/**
|
||||||
* AssetHashService constructor.
|
* AssetHashService constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(Application $application, FilesystemManager $filesystem)
|
public function __construct(FilesystemManager $filesystem)
|
||||||
{
|
{
|
||||||
$this->application = $application;
|
|
||||||
$this->filesystem = $filesystem->createLocalDriver(['root' => public_path()]);
|
$this->filesystem = $filesystem->createLocalDriver(['root' => public_path()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ use Illuminate\Support\Collection;
|
||||||
use Pterodactyl\Models\Allocation;
|
use Pterodactyl\Models\Allocation;
|
||||||
use Illuminate\Database\ConnectionInterface;
|
use Illuminate\Database\ConnectionInterface;
|
||||||
use Pterodactyl\Models\Objects\DeploymentObject;
|
use Pterodactyl\Models\Objects\DeploymentObject;
|
||||||
use Pterodactyl\Repositories\Eloquent\EggRepository;
|
|
||||||
use Pterodactyl\Repositories\Eloquent\ServerRepository;
|
use Pterodactyl\Repositories\Eloquent\ServerRepository;
|
||||||
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
||||||
use Pterodactyl\Services\Deployment\FindViableNodesService;
|
use Pterodactyl\Services\Deployment\FindViableNodesService;
|
||||||
|
@ -26,12 +25,7 @@ class ServerCreationService
|
||||||
* @var \Pterodactyl\Services\Deployment\AllocationSelectionService
|
* @var \Pterodactyl\Services\Deployment\AllocationSelectionService
|
||||||
*/
|
*/
|
||||||
private $allocationSelectionService;
|
private $allocationSelectionService;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \Pterodactyl\Services\Servers\ServerConfigurationStructureService
|
|
||||||
*/
|
|
||||||
private $configurationStructureService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Illuminate\Database\ConnectionInterface
|
* @var \Illuminate\Database\ConnectionInterface
|
||||||
*/
|
*/
|
||||||
|
@ -47,11 +41,6 @@ class ServerCreationService
|
||||||
*/
|
*/
|
||||||
private $validatorService;
|
private $validatorService;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \Pterodactyl\Repositories\Eloquent\EggRepository
|
|
||||||
*/
|
|
||||||
private $eggRepository;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Pterodactyl\Repositories\Eloquent\ServerRepository
|
* @var \Pterodactyl\Repositories\Eloquent\ServerRepository
|
||||||
*/
|
*/
|
||||||
|
@ -74,29 +63,21 @@ class ServerCreationService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CreationService constructor.
|
* CreationService constructor.
|
||||||
*
|
|
||||||
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
|
|
||||||
* @param \Pterodactyl\Services\Servers\ServerDeletionService $serverDeletionService
|
|
||||||
* @param \Pterodactyl\Services\Servers\VariableValidatorService $validatorService
|
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
AllocationSelectionService $allocationSelectionService,
|
AllocationSelectionService $allocationSelectionService,
|
||||||
ConnectionInterface $connection,
|
ConnectionInterface $connection,
|
||||||
DaemonServerRepository $daemonServerRepository,
|
DaemonServerRepository $daemonServerRepository,
|
||||||
EggRepository $eggRepository,
|
|
||||||
FindViableNodesService $findViableNodesService,
|
FindViableNodesService $findViableNodesService,
|
||||||
ServerConfigurationStructureService $configurationStructureService,
|
|
||||||
ServerDeletionService $serverDeletionService,
|
ServerDeletionService $serverDeletionService,
|
||||||
ServerRepository $repository,
|
ServerRepository $repository,
|
||||||
ServerVariableRepository $serverVariableRepository,
|
ServerVariableRepository $serverVariableRepository,
|
||||||
VariableValidatorService $validatorService
|
VariableValidatorService $validatorService
|
||||||
) {
|
) {
|
||||||
$this->allocationSelectionService = $allocationSelectionService;
|
$this->allocationSelectionService = $allocationSelectionService;
|
||||||
$this->configurationStructureService = $configurationStructureService;
|
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
$this->findViableNodesService = $findViableNodesService;
|
$this->findViableNodesService = $findViableNodesService;
|
||||||
$this->validatorService = $validatorService;
|
$this->validatorService = $validatorService;
|
||||||
$this->eggRepository = $eggRepository;
|
|
||||||
$this->repository = $repository;
|
$this->repository = $repository;
|
||||||
$this->serverVariableRepository = $serverVariableRepository;
|
$this->serverVariableRepository = $serverVariableRepository;
|
||||||
$this->daemonServerRepository = $daemonServerRepository;
|
$this->daemonServerRepository = $daemonServerRepository;
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace Pterodactyl\Services\Servers;
|
||||||
|
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
use Pterodactyl\Models\Server;
|
use Pterodactyl\Models\Server;
|
||||||
use Illuminate\Database\ConnectionInterface;
|
|
||||||
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
||||||
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
|
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
|
||||||
|
|
||||||
|
@ -12,12 +11,7 @@ class SuspensionService
|
||||||
{
|
{
|
||||||
public const ACTION_SUSPEND = 'suspend';
|
public const ACTION_SUSPEND = 'suspend';
|
||||||
public const ACTION_UNSUSPEND = 'unsuspend';
|
public const ACTION_UNSUSPEND = 'unsuspend';
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \Illuminate\Database\ConnectionInterface
|
|
||||||
*/
|
|
||||||
private $connection;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Pterodactyl\Repositories\Wings\DaemonServerRepository
|
* @var \Pterodactyl\Repositories\Wings\DaemonServerRepository
|
||||||
*/
|
*/
|
||||||
|
@ -26,11 +20,7 @@ class SuspensionService
|
||||||
/**
|
/**
|
||||||
* SuspensionService constructor.
|
* SuspensionService constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(DaemonServerRepository $daemonServerRepository) {
|
||||||
ConnectionInterface $connection,
|
|
||||||
DaemonServerRepository $daemonServerRepository
|
|
||||||
) {
|
|
||||||
$this->connection = $connection;
|
|
||||||
$this->daemonServerRepository = $daemonServerRepository;
|
$this->daemonServerRepository = $daemonServerRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,6 @@ use Illuminate\Support\Arr;
|
||||||
|
|
||||||
class FileObjectTransformer extends BaseDaemonTransformer
|
class FileObjectTransformer extends BaseDaemonTransformer
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* An array of files we allow editing in the Panel.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private $editable = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform a file object response from the daemon into a standardized response.
|
* Transform a file object response from the daemon into a standardized response.
|
||||||
*
|
*
|
||||||
|
|
|
@ -54,7 +54,8 @@
|
||||||
"mockery/mockery": "^1.4.4",
|
"mockery/mockery": "^1.4.4",
|
||||||
"nunomaduro/collision": "^5.11.0",
|
"nunomaduro/collision": "^5.11.0",
|
||||||
"nunomaduro/larastan": "^1.0.3",
|
"nunomaduro/larastan": "^1.0.3",
|
||||||
"php-mock/php-mock-phpunit": "^2.6",
|
"php-mock/php-mock-phpunit": "^2.6.0",
|
||||||
|
"phpstan/phpstan": "^1.4.6",
|
||||||
"phpstan/phpstan-webmozart-assert": "^1.0.9",
|
"phpstan/phpstan-webmozart-assert": "^1.0.9",
|
||||||
"phpunit/phpunit": "^9.5.13"
|
"phpunit/phpunit": "^9.5.13"
|
||||||
},
|
},
|
||||||
|
|
2
composer.lock
generated
2
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "3b6af4c08168510289a6fb0f60c91888",
|
"content-hash": "4c3e8a8b296bf2d9fc55ccf75c0bec6c",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aws/aws-crt-php",
|
"name": "aws/aws-crt-php",
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
parameters:
|
parameters:
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$string of function strtoupper expects string, int\\|string given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Console/Commands/Environment/AppSettingsCommand.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, string\\|false\\|null given\\.$#"
|
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, string\\|false\\|null given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -15,11 +10,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Console/Commands/Environment/AppSettingsCommand.php
|
path: app/Console/Commands/Environment/AppSettingsCommand.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$string of function strtoupper expects string, int\\|string given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Console/Commands/Environment/DatabaseSettingsCommand.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, string\\|false\\|null given\\.$#"
|
message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, string\\|false\\|null given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -30,11 +20,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Console/Commands/Environment/DatabaseSettingsCommand.php
|
path: app/Console/Commands/Environment/DatabaseSettingsCommand.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$string of function strtoupper expects string, int\\|string given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Console/Commands/Environment/EmailSettingsCommand.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$value of function studly_case expects string, array\\|bool\\|string given\\.$#"
|
message: "#^Parameter \\#1 \\$value of function studly_case expects string, array\\|bool\\|string given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -56,12 +41,12 @@ parameters:
|
||||||
path: app/Console/Commands/Server/BulkPowerActionCommand.php
|
path: app/Console/Commands/Server/BulkPowerActionCommand.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#2 \\$string of function explode expects string, array\\|bool\\|string given\\.$#"
|
message: "#^Parameter \\#2 \\$string of function explode expects string, array\\|string\\|true given\\.$#"
|
||||||
count: 2
|
count: 2
|
||||||
path: app/Console/Commands/Server/BulkPowerActionCommand.php
|
path: app/Console/Commands/Server/BulkPowerActionCommand.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Binary operation \"\\.\" between 'download/v' and array\\|bool\\|string\\|null results in an error\\.$#"
|
message: "#^Binary operation \"\\.\" between 'download/v' and non\\-empty\\-array\\|non\\-empty\\-string\\|true results in an error\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Console/Commands/UpgradeCommand.php
|
path: app/Console/Commands/UpgradeCommand.php
|
||||||
|
|
||||||
|
@ -71,7 +56,7 @@ parameters:
|
||||||
path: app/Console/Commands/UpgradeCommand.php
|
path: app/Console/Commands/UpgradeCommand.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method Pterodactyl\\\\Console\\\\Commands\\\\UpgradeCommand\\:\\:getUrl\\(\\) should return string but returns array\\|bool\\|string\\|null\\.$#"
|
message: "#^Method Pterodactyl\\\\Console\\\\Commands\\\\UpgradeCommand\\:\\:getUrl\\(\\) should return string but returns array\\|string\\|true\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Console/Commands/UpgradeCommand.php
|
path: app/Console/Commands/UpgradeCommand.php
|
||||||
|
|
||||||
|
@ -86,17 +71,7 @@ parameters:
|
||||||
path: app/Console/Commands/UpgradeCommand.php
|
path: app/Console/Commands/UpgradeCommand.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Binary operation \"\\.\" between array\\|string and '\\.' results in an error\\.$#"
|
message: "#^Unable to resolve the template type TReturn in call to method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),array\\<int, mixed\\>\\>\\:\\:flatMap\\(\\)$#"
|
||||||
count: 1
|
|
||||||
path: app/Exceptions/Handler.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Possibly invalid array key type array\\|string\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Exceptions/Handler.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Unable to resolve the template type TReturn in call to method Illuminate\\\\Support\\\\Collection\\<mixed,array\\<int, mixed\\>\\>\\:\\:flatMap\\(\\)$#"
|
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Exceptions/Handler.php
|
path: app/Exceptions/Handler.php
|
||||||
|
|
||||||
|
@ -105,11 +80,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Extensions/Backups/BackupManager.php
|
path: app/Extensions/Backups/BackupManager.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$message of static method Illuminate\\\\Log\\\\Logger\\:\\:info\\(\\) expects string, string\\|false given\\.$#"
|
|
||||||
count: 2
|
|
||||||
path: app/Http/Controllers/Api/Application/Eggs/EggController.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#2 \\$content of method Pterodactyl\\\\Services\\\\Eggs\\\\Sharing\\\\EggImporterService\\:\\:handleContent\\(\\) expects string, resource\\|string given\\.$#"
|
message: "#^Parameter \\#2 \\$content of method Pterodactyl\\\\Services\\\\Eggs\\\\Sharing\\\\EggImporterService\\:\\:handleContent\\(\\) expects string, resource\\|string given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -125,56 +95,326 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Http/Controllers/Api/Client/Servers/FileController.php
|
path: app/Http/Controllers/Api/Client/Servers/FileController.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Access to an undefined property Pterodactyl\\\\Models\\\\EggVariable\\:\\:\\$server_value\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Controllers/Api/Client/Servers/StartupController.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Property Pterodactyl\\\\Http\\\\Controllers\\\\Api\\\\Remote\\\\Backups\\\\BackupRemoteUploadController\\:\\:\\$repository is never read, only written\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Controllers/Api/Remote/Backups/BackupRemoteUploadController.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Property Pterodactyl\\\\Http\\\\Controllers\\\\Api\\\\Remote\\\\Servers\\\\ServerTransferController\\:\\:\\$configurationStructureService is never read, only written\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Controllers/Api/Remote/Servers/ServerTransferController.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Offset 'server' on array\\{username\\: string, server\\: non\\-empty\\-string\\} on left side of \\?\\? always exists and is not nullable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Controllers/Api/Remote/SftpAuthenticationController.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot call method named\\(\\) on object\\|string\\.$#"
|
||||||
|
count: 2
|
||||||
|
path: app/Http/Controllers/Auth/AbstractLoginController.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Controllers/Auth/LoginCheckpointController.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Variable \\$user might not be defined\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Controllers/Auth/LoginCheckpointController.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$string of function md5 expects string, string\\|false given\\.$#"
|
message: "#^Parameter \\#1 \\$string of function md5 expects string, string\\|false given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Http/Controllers/Base/LocaleController.php
|
path: app/Http/Controllers/Base/LocaleController.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$key of method Illuminate\\\\Routing\\\\Router\\:\\:bind\\(\\) expects string, int\\|string given\\.$#"
|
message: "#^Parameter \\#1 \\$route of method Illuminate\\\\Contracts\\\\Routing\\\\Registrar\\:\\:substituteImplicitBindings\\(\\) expects Illuminate\\\\Routing\\\\Route, object\\|string\\|null given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php
|
path: app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Result of && is always false\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Variable \\$route in empty\\(\\) is never defined\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Property Pterodactyl\\\\Http\\\\Middleware\\\\Api\\\\Client\\\\Server\\\\AuthenticateServerAccess\\:\\:\\$repository is never read, only written\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Client/Server/AuthenticateServerAccess.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot call method parameters\\(\\) on object\\|string\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Client/Server/ResourceBelongsToServer.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Parameter \\#1 \\$route of method Illuminate\\\\Contracts\\\\Routing\\\\Registrar\\:\\:substituteBindings\\(\\) expects Illuminate\\\\Routing\\\\Route, object\\|string\\|null given\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Result of && is always false\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Variable \\$route in empty\\(\\) is never defined\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot call method getName\\(\\) on object\\|string\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/Daemon/DaemonAuthenticate.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$json of function json_decode expects string, resource\\|string given\\.$#"
|
message: "#^Parameter \\#1 \\$json of function json_decode expects string, resource\\|string given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Http/Middleware/Api/IsValidJson.php
|
path: app/Http/Middleware/Api/IsValidJson.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot call method parameters\\(\\) on object\\|string\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/PreventUnboundModels.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot call method signatureParameters\\(\\) on object\\|string\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/Api/PreventUnboundModels.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot call method getName\\(\\) on object\\|string\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Http/Middleware/RequireTwoFactorAuthentication.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$array of function array_get expects array\\|ArrayAccess, array\\<string, int\\|string\\>\\|false given\\.$#"
|
message: "#^Parameter \\#1 \\$array of function array_get expects array\\|ArrayAccess, array\\<string, int\\|string\\>\\|false given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Http/Middleware/VerifyReCaptcha.php
|
path: app/Http/Middleware/VerifyReCaptcha.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$value of function snake_case expects string, int\\|string given\\.$#"
|
message: "#^Method Pterodactyl\\\\Jobs\\\\Schedule\\\\RunTaskJob\\:\\:__construct\\(\\) has parameter \\$manualRun with no type specified\\.$#"
|
||||||
count: 1
|
|
||||||
path: app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Method Pterodactyl\\\\Jobs\\\\Schedule\\\\RunTaskJob\\:\\:__construct\\(\\) has parameter \\$manualRun with no typehint specified\\.$#"
|
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Jobs/Schedule/RunTaskJob.php
|
path: app/Jobs/Schedule/RunTaskJob.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#2 \\$column of static method Illuminate\\\\Validation\\\\Rule\\:\\:unique\\(\\) expects string, int\\|string given\\.$#"
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\AdminRole\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Models/Model.php
|
path: app/Models/AdminRole.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Allocation\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Allocation.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Database\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Database.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\DatabaseHost\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/DatabaseHost.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Egg\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Egg.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type null of property Pterodactyl\\\\Models\\\\EggMount\\:\\:\\$primaryKey is not covariant with PHPDoc type string of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$primaryKey\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/EggMount.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\EggVariable\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/EggVariable.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Location\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Location.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Mount\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Mount.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type null of property Pterodactyl\\\\Models\\\\MountNode\\:\\:\\$primaryKey is not covariant with PHPDoc type string of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$primaryKey\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/MountNode.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type null of property Pterodactyl\\\\Models\\\\MountServer\\:\\:\\$primaryKey is not covariant with PHPDoc type string of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$primaryKey\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/MountServer.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Nest\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Nest.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method Pterodactyl\\\\Models\\\\Node\\:\\:getJsonConfiguration\\(\\) should return string but returns string\\|false\\.$#"
|
message: "#^Method Pterodactyl\\\\Models\\\\Node\\:\\:getJsonConfiguration\\(\\) should return string but returns string\\|false\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Models/Node.php
|
path: app/Models/Node.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Node\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Node.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Permission\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Permission.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Schedule\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Schedule.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Server\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Server.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\ServerTransfer\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/ServerTransfer.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Setting\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Setting.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Subuser\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Subuser.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\Task\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/Task.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\TaskLog\\:\\:\\$guarded is not covariant with PHPDoc type array\\<string\\>\\|bool of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$guarded\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/TaskLog.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^PHPDoc type array of property Pterodactyl\\\\Models\\\\User\\:\\:\\$fillable is not covariant with PHPDoc type array\\<string\\> of overridden property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$fillable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Models/User.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Access to an undefined property object\\:\\:\\$name\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Notifications/AddedToServer.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Access to an undefined property object\\:\\:\\$uuidShort\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Notifications/AddedToServer.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Access to an undefined property object\\:\\:\\$name\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Notifications/RemovedFromServer.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Property Pterodactyl\\\\Observers\\\\UserObserver\\:\\:\\$uuid has no type specified\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Observers/UserObserver.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot access offset 'config' on Illuminate\\\\Contracts\\\\Foundation\\\\Application\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Providers/HashidsServiceProvider.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot call method named\\(\\) on object\\|string\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Providers/RouteServiceProvider.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Method Pterodactyl\\\\Repositories\\\\Eloquent\\\\EloquentRepository\\:\\:updateOrCreate\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Model but returns bool\\|Illuminate\\\\Database\\\\Eloquent\\\\Model\\.$#"
|
message: "#^Method Pterodactyl\\\\Repositories\\\\Eloquent\\\\EloquentRepository\\:\\:updateOrCreate\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Model but returns bool\\|Illuminate\\\\Database\\\\Eloquent\\\\Model\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Repositories/Eloquent/EloquentRepository.php
|
path: app/Repositories/Eloquent/EloquentRepository.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\.\\.\\.\\$model of method Pterodactyl\\\\Repositories\\\\Repository\\:\\:initializeModel\\(\\) expects class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, mixed given\\.$#"
|
message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$sum_disk\\.$#"
|
||||||
|
count: 2
|
||||||
|
path: app/Repositories/Eloquent/NodeRepository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$sum_memory\\.$#"
|
||||||
|
count: 2
|
||||||
|
path: app/Repositories/Eloquent/NodeRepository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Method Pterodactyl\\\\Repositories\\\\Eloquent\\\\NodeRepository\\:\\:getNodeWithResourceUsage\\(\\) should return Pterodactyl\\\\Models\\\\Node but returns Illuminate\\\\Database\\\\Eloquent\\\\Model\\|null\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Repositories/Eloquent/NodeRepository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:\\$value\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Repositories/Eloquent/SettingsRepository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Method Pterodactyl\\\\Repositories\\\\Eloquent\\\\SubuserRepository\\:\\:getWithPermissionsUsingUserAndServer\\(\\) should return Pterodactyl\\\\Models\\\\Subuser but returns Illuminate\\\\Database\\\\Eloquent\\\\Model\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Repositories/Eloquent/SubuserRepository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Method Pterodactyl\\\\Repositories\\\\Eloquent\\\\TaskRepository\\:\\:getNextTask\\(\\) should return Pterodactyl\\\\Models\\\\Task\\|null but returns Illuminate\\\\Database\\\\Eloquent\\\\Model\\|null\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Repositories/Eloquent/TaskRepository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Parameter \\#1 \\.\\.\\.\\$model of method Pterodactyl\\\\Repositories\\\\Repository\\:\\:initializeModel\\(\\) expects class\\-string\\<Illuminate\\\\Database\\\\Eloquent\\\\Model\\>, object\\|string given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Repositories/Repository.php
|
path: app/Repositories/Repository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Expression on left side of \\?\\? is not nullable\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Repositories/Wings/DaemonFileRepository.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Dead catch \\- Exception is never thrown in the try block\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Services/Databases/DatabaseManagementService.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Argument of an invalid type iterable\\|object supplied for foreach, only iterables are supported\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Services/Eggs/EggConfigurationService.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot clone non\\-object variable \\$data of type iterable\\|object\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: app/Services/Eggs/EggConfigurationService.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#2 \\$content of method Pterodactyl\\\\Services\\\\Eggs\\\\Sharing\\\\EggImporterService\\:\\:handleContent\\(\\) expects string, string\\|false given\\.$#"
|
message: "#^Parameter \\#2 \\$content of method Pterodactyl\\\\Services\\\\Eggs\\\\Sharing\\\\EggImporterService\\:\\:handleContent\\(\\) expects string, string\\|false given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -185,16 +425,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Services/Eggs/Sharing/EggUpdateImporterService.php
|
path: app/Services/Eggs/Sharing/EggUpdateImporterService.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$value of static method Illuminate\\\\Support\\\\Str\\:\\:snake\\(\\) expects string, array\\|string given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Services/Eggs/Variables/VariableCreationService.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$value of static method Illuminate\\\\Support\\\\Str\\:\\:snake\\(\\) expects string, array\\|string given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Services/Eggs/Variables/VariableUpdateService.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
|
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -205,21 +435,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Services/Helpers/SoftwareVersionService.php
|
path: app/Services/Helpers/SoftwareVersionService.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$id of method Lcobucci\\\\JWT\\\\Builder\\:\\:identifiedBy\\(\\) expects string, string\\|false given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Services/Nodes/NodeJWTService.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$name of method Lcobucci\\\\JWT\\\\Builder\\:\\:withClaim\\(\\) expects string, int\\|string given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Services/Nodes/NodeJWTService.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$key of method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:setAttribute\\(\\) expects string, int\\|string given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Services/Servers/ServerConfigurationStructureService.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<Pterodactyl\\\\Models\\\\Allocation\\>\\|Pterodactyl\\\\Models\\\\Allocation\\:\\:\\$node_id\\.$#"
|
message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<Pterodactyl\\\\Models\\\\Allocation\\>\\|Pterodactyl\\\\Models\\\\Allocation\\:\\:\\$node_id\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -235,11 +450,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: app/Services/Subusers/SubuserCreationService.php
|
path: app/Services/Subusers/SubuserCreationService.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Parameter \\#1 \\$string of function urlencode expects string, array\\|string\\|null given\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: app/Services/Users/TwoFactorSetupService.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Cannot call method getResourceName\\(\\) on \\(callable&class\\-string\\)\\|\\(callable&object\\)\\|League\\\\Fractal\\\\TransformerAbstract\\.$#"
|
message: "#^Cannot call method getResourceName\\(\\) on \\(callable&class\\-string\\)\\|\\(callable&object\\)\\|League\\\\Fractal\\\\TransformerAbstract\\.$#"
|
||||||
count: 2
|
count: 2
|
||||||
|
|
|
@ -9,7 +9,8 @@ parameters:
|
||||||
- database/Seeders
|
- database/Seeders
|
||||||
level: 7
|
level: 7
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '#Unsafe usage of new static#'
|
- "#Unsafe usage of new static#"
|
||||||
- '#has no return typehint specified.#'
|
- "#has no return type specified\\.#"
|
||||||
- '#has no typehint specified.#'
|
# Just ignore this entirey, causes a lot of noise for minimal gain on the requests.
|
||||||
|
- "#^Cannot call method parameter\\(\\) on object\\|string\\.$#"
|
||||||
checkMissingIterableValueType: false
|
checkMissingIterableValueType: false
|
||||||
|
|
Loading…
Reference in a new issue