php-cs-fixer and phpstan

This commit is contained in:
Matthew Penner 2022-12-14 18:04:16 -07:00
parent 363c4fd49f
commit 7ed2be50fd
No known key found for this signature in database
25 changed files with 102 additions and 109 deletions

View file

@ -116,7 +116,7 @@ class EggImporterService
'copy_script_from' => null,
]);
$egg = $this->parser->fillFromParsed($egg, $parsed);
$egg = $this->eggParserService->fillFromParsed($egg, $parsed);
$egg->save();
foreach ($parsed['variables'] ?? [] as $variable) {

View file

@ -8,7 +8,6 @@ use Pterodactyl\Models\EggVariable;
use Pterodactyl\Exceptions\DisplayException;
use Pterodactyl\Traits\Services\ValidatesValidationRules;
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
use Pterodactyl\Contracts\Repository\EggVariableRepositoryInterface;
use Pterodactyl\Exceptions\Service\Egg\Variable\ReservedVariableNameException;
class VariableUpdateService
@ -18,7 +17,7 @@ class VariableUpdateService
/**
* VariableUpdateService constructor.
*/
public function __construct(private EggVariableRepositoryInterface $repository, private ValidationFactory $validator)
public function __construct(private ValidationFactory $validator)
{
}

View file

@ -122,7 +122,7 @@ class SoftwareVersionService
protected function versionData(): array
{
return $this->cache->remember(self::GIT_VERSION_CACHE_KEY, CarbonImmutable::now()->addSeconds(15), function () {
$configVersion = config()->get('app.version');
$configVersion = $this->getCurrentVersion();
if (file_exists(base_path('.git/HEAD'))) {
$head = explode(' ', file_get_contents(base_path('.git/HEAD')));

View file

@ -16,6 +16,7 @@ use Pterodactyl\Models\Location;
use Illuminate\Support\Facades\DB;
use Pterodactyl\Models\Allocation;
use Illuminate\Support\Facades\Http;
use Pterodactyl\Services\Helpers\SoftwareVersionService;
use Pterodactyl\Repositories\Eloquent\SettingsRepository;
use Pterodactyl\Repositories\Wings\DaemonConfigurationRepository;
@ -26,7 +27,8 @@ class TelemetryCollectionService
*/
public function __construct(
private DaemonConfigurationRepository $daemonConfigurationRepository,
private SettingsRepository $settingsRepository
private SettingsRepository $settingsRepository,
private SoftwareVersionService $softwareVersionService
) {
}
@ -108,7 +110,7 @@ class TelemetryCollectionService
'id' => $uuid,
'panel' => [
'version' => config('app.version'),
'version' => $this->softwareVersionService->getCurrentVersion(),
'phpVersion' => phpversion(),
'drivers' => [