Introduce type hinting in methods prototype (PHP >= 7.1)

This commit is contained in:
Molkobain
2020-08-26 21:21:56 +02:00
parent 77cd764b1c
commit 825c70c001
30 changed files with 246 additions and 191 deletions

View File

@@ -52,9 +52,10 @@ class BlockRenderer
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
*/
public static function RenderBlockTemplates(iUIBlock $oBlock, $aContextParams = [])
public static function RenderBlockTemplates(iUIBlock $oBlock, array $aContextParams = [])
{
$oSelf = new static($oBlock, $aContextParams);
return $oSelf->RenderTemplates();
}
@@ -71,9 +72,9 @@ class BlockRenderer
* @param \Combodo\iTop\Application\UI\iUIBlock $oBlock
* @param array $aContextParams
*/
public function __construct(iUIBlock $oBlock, $aContextParams = [])
public function __construct(iUIBlock $oBlock, array $aContextParams = [])
{
if(null === static::$oTwigEnv)
if (null === static::$oTwigEnv)
{
static::$oTwigEnv = TwigHelper::GetTwigEnvironment(static::TWIG_BASE_PATH, static::TWIG_ADDITIONAL_PATHS);
}