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

@ -51,11 +51,10 @@ abstract class PdoAbstract
}
/**
* @return \PDO
*
* @throws \Exception
*/
protected function getPDO()
protected function getPDO() : \PDO
{
if ($this->oPDO)
{
@ -153,10 +152,7 @@ abstract class PdoAbstract
return $this->getPDO()->rollBack();
}
/**
* @return \PDOStatement|null
*/
protected function prepareAndExecute(string $sSql, array $aParams = array(), bool $bMultiplyParams = false, bool $bLogParams = false)
protected function prepareAndExecute(string $sSql, array $aParams = array(), bool $bMultiplyParams = false, bool $bLogParams = false) : ?\PDOStatement
{
if ($this->bExplain && !$bMultiplyParams)
{
@ -292,10 +288,7 @@ abstract class PdoAbstract
return $oPdo ? $oPdo->quote((string) $sValue, \PDO::PARAM_STR) : '\'\'';
}
/**
* @return int|string|bool
*/
protected function getSystemValue(string $sName, bool $bReturnIntValue = true)
protected function getSystemValue(string $sName, bool $bReturnIntValue = true) : int
{
$oPdo = $this->getPDO();
if ($oPdo)
@ -328,10 +321,7 @@ abstract class PdoAbstract
return false;
}
/**
* @return int|string|bool
*/
protected function getVersion(string $sName)
protected function getVersion(string $sName) : int
{
return $this->getSystemValue($sName.'_version', true);
}