fix remaining psalm issues

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-11-24 17:38:50 +01:00
parent 473ddbfcee
commit 5dd2048500
6 changed files with 9 additions and 36 deletions

View file

@ -185,7 +185,7 @@ readonly class DockerController {
$config = $this->configurationManager->GetConfig();
// set AIO_URL
$config['AIO_URL'] = $host . ':' . $port . $path;
$config['AIO_URL'] = $host . ':' . (string)$port . $path;
// set wasStartButtonClicked
$config['wasStartButtonClicked'] = 1;
// set install_latest_major

View file

@ -366,6 +366,9 @@ class ConfigurationManager
// Check if response is correct
$ch = curl_init();
if ($ch === false) {
throw new InvalidSettingConfigurationException('Could not init curl! Please check the logs!');
}
$testUrl = $protocol . $domain . ':443';
curl_setopt($ch, CURLOPT_URL, $testUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

View file

@ -155,11 +155,11 @@ readonly class DockerActionManager {
$response = "";
$separator = "\r\n";
$line = strtok($responseBody, $separator);
$response = substr($line, 8) . $separator;
$response = substr((string)$line, 8) . $separator;
while ($line !== false) {
$line = strtok($separator);
$response .= substr($line, 8) . $separator;
$response .= substr((string)$line, 8) . $separator;
}
return $response;

View file

@ -7,6 +7,7 @@ use Twig\TwigFunction;
class ClassExtension extends TwigExtension
{
#[\Override]
public function getFunctions() : array
{
return array(

View file

@ -12,6 +12,7 @@ class CsrfExtension extends AbstractExtension implements GlobalsInterface {
) {
}
#[\Override]
public function getGlobals() : array
{
// CSRF token name and value