mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
fix further psalm issues
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
cbcc5259bd
commit
ab20433940
2 changed files with 6 additions and 24 deletions
|
|
@ -6,12 +6,6 @@
|
|||
</InvalidOperand>
|
||||
</file>
|
||||
<file src="src/Data/ConfigurationManager.php">
|
||||
<FalsableReturnStatement>
|
||||
<code><![CDATA[$additionalBackupDirectories]]></code>
|
||||
</FalsableReturnStatement>
|
||||
<InvalidFalsableReturnType>
|
||||
<code><![CDATA[string]]></code>
|
||||
</InvalidFalsableReturnType>
|
||||
<PossiblyFalseArgument>
|
||||
<code><![CDATA[$ch]]></code>
|
||||
<code><![CDATA[$ch]]></code>
|
||||
|
|
@ -19,11 +13,6 @@
|
|||
<code><![CDATA[$ch]]></code>
|
||||
<code><![CDATA[$ch]]></code>
|
||||
<code><![CDATA[$ch]]></code>
|
||||
<code><![CDATA[$configContent]]></code>
|
||||
<code><![CDATA[$content]]></code>
|
||||
<code><![CDATA[$content]]></code>
|
||||
<code><![CDATA[$dailyBackupFile]]></code>
|
||||
<code><![CDATA[$dailyBackupFile]]></code>
|
||||
</PossiblyFalseArgument>
|
||||
</file>
|
||||
<file src="src/Docker/DockerActionManager.php">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class ConfigurationManager
|
|||
{
|
||||
if(file_exists(DataConst::GetConfigFile()))
|
||||
{
|
||||
$configContent = file_get_contents(DataConst::GetConfigFile());
|
||||
$configContent = (string)file_get_contents(DataConst::GetConfigFile());
|
||||
return json_decode($configContent, true, 512, JSON_THROW_ON_ERROR);
|
||||
}
|
||||
|
||||
|
|
@ -80,10 +80,7 @@ class ConfigurationManager
|
|||
return '';
|
||||
}
|
||||
|
||||
$content = file_get_contents(DataConst::GetBackupArchivesList());
|
||||
if ($content === '') {
|
||||
return '';
|
||||
}
|
||||
$content = (string)file_get_contents(DataConst::GetBackupArchivesList());
|
||||
|
||||
$lastBackupLines = explode("\n", $content);
|
||||
$lastBackupLine = "";
|
||||
|
|
@ -108,10 +105,7 @@ class ConfigurationManager
|
|||
return [];
|
||||
}
|
||||
|
||||
$content = file_get_contents(DataConst::GetBackupArchivesList());
|
||||
if ($content === '') {
|
||||
return [];
|
||||
}
|
||||
$content = (string)file_get_contents(DataConst::GetBackupArchivesList());
|
||||
|
||||
$backupLines = explode("\n", $content);
|
||||
$backupTimes = [];
|
||||
|
|
@ -795,7 +789,7 @@ class ConfigurationManager
|
|||
if (!file_exists(DataConst::GetDailyBackupTimeFile())) {
|
||||
return '';
|
||||
}
|
||||
$dailyBackupFile = file_get_contents(DataConst::GetDailyBackupTimeFile());
|
||||
$dailyBackupFile = (string)file_get_contents(DataConst::GetDailyBackupTimeFile());
|
||||
$dailyBackupFileArray = explode("\n", $dailyBackupFile);
|
||||
return $dailyBackupFileArray[0];
|
||||
}
|
||||
|
|
@ -804,7 +798,7 @@ class ConfigurationManager
|
|||
if (!file_exists(DataConst::GetDailyBackupTimeFile())) {
|
||||
return false;
|
||||
}
|
||||
$dailyBackupFile = file_get_contents(DataConst::GetDailyBackupTimeFile());
|
||||
$dailyBackupFile = (string)file_get_contents(DataConst::GetDailyBackupTimeFile());
|
||||
$dailyBackupFileArray = explode("\n", $dailyBackupFile);
|
||||
if (isset($dailyBackupFileArray[1]) && $dailyBackupFileArray[1] === 'automaticUpdatesAreNotEnabled') {
|
||||
return false;
|
||||
|
|
@ -855,8 +849,7 @@ class ConfigurationManager
|
|||
if (!file_exists(DataConst::GetAdditionalBackupDirectoriesFile())) {
|
||||
return '';
|
||||
}
|
||||
$additionalBackupDirectories = file_get_contents(DataConst::GetAdditionalBackupDirectoriesFile());
|
||||
return $additionalBackupDirectories;
|
||||
return (string)file_get_contents(DataConst::GetAdditionalBackupDirectoriesFile());
|
||||
}
|
||||
|
||||
public function GetAdditionalBackupDirectoriesArray() : array {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue