mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-09 09:27:03 +03:00
More params and returns to PHP 7.3+
This commit is contained in:
parent
3d246ae842
commit
26c38b3ec9
95 changed files with 1028 additions and 4865 deletions
|
|
@ -45,11 +45,10 @@ class Literal
|
|||
|
||||
/**
|
||||
* @param resource $rStream
|
||||
* @param int $iLiteralLen
|
||||
*
|
||||
* @return resource|bool
|
||||
*/
|
||||
public static function CreateStream($rStream, $iLiteralLen)
|
||||
public static function CreateStream($rStream, int $iLiteralLen)
|
||||
{
|
||||
if (!in_array(self::STREAM_NAME, stream_get_wrappers()))
|
||||
{
|
||||
|
|
@ -65,12 +64,7 @@ class Literal
|
|||
return fopen(self::STREAM_NAME.'://'.$sHashName, 'rb');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sPath
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function stream_open($sPath)
|
||||
public function stream_open(string $sPath) : bool
|
||||
{
|
||||
$this->iPos = 0;
|
||||
$this->iSize = 0;
|
||||
|
|
@ -98,12 +92,7 @@ class Literal
|
|||
return $bResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $iCount
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function stream_read($iCount)
|
||||
public function stream_read(int $iCount) : string
|
||||
{
|
||||
$sResult = false;
|
||||
if ($this->iSize < $this->iPos + $iCount)
|
||||
|
|
@ -138,34 +127,22 @@ class Literal
|
|||
return $sResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function stream_write()
|
||||
public function stream_write() : int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function stream_tell()
|
||||
public function stream_tell() : int
|
||||
{
|
||||
return $this->iPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function stream_eof()
|
||||
public function stream_eof() : bool
|
||||
{
|
||||
return $this->iPos >= $this->iSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function stream_stat()
|
||||
public function stream_stat() : array
|
||||
{
|
||||
return array(
|
||||
'dev' => 2,
|
||||
|
|
@ -184,10 +161,7 @@ class Literal
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function stream_seek()
|
||||
public function stream_seek() : bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue