More params and returns to PHP 7.3+

This commit is contained in:
djmaze 2020-03-16 13:08:53 +01:00
parent 3d246ae842
commit 26c38b3ec9
95 changed files with 1028 additions and 4865 deletions

View file

@ -28,9 +28,8 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
/**
* @param \RainLoop\Model\Account|string|null $oAccount
* @param mixed $sValue
*/
public function Put($oAccount, int $iStorageType, string $sKey, $sValue) : bool
public function Put($oAccount, int $iStorageType, string $sKey, string $sValue) : bool
{
return false !== @\file_put_contents(
$this->generateFileName($oAccount, $iStorageType, $sKey, true), $sValue);
@ -166,9 +165,6 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
return $sFilePath;
}
/**
* @param \MailSo\Log\Logger $oLogger
*/
public function SetLogger(?\MailSo\Log\Logger $oLogger)
{
$this->oLogger = $oLogger;

View file

@ -6,9 +6,8 @@ interface IStorage
{
/**
* @param \RainLoop\Model\Account|null $oAccount
* @param mixed $sValue
*/
public function Put($oAccount, int $iStorageType, string $sKey, $sValue) : bool;
public function Put($oAccount, int $iStorageType, string $sKey, string $sValue) : bool;
/**
* @param \RainLoop\Model\Account|null $oAccount

View file

@ -6,9 +6,8 @@ class TemproryApcStorage extends \RainLoop\Providers\Storage\FileStorage
{
/**
* @param \RainLoop\Model\Account|string|null $oAccount
* @param mixed $sValue
*/
public function Put($oAccount, int $iStorageType, string $sKey, $sValue) : bool
public function Put($oAccount, int $iStorageType, string $sKey, string $sValue) : bool
{
return !!@\apc_store($this->generateFileName($oAccount, $iStorageType, $sKey, true), $sValue);
}