for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Automation tool mixed with code generator for easier continuous development
*
* @link https://github.com/hiqdev/hidev
* @package hidev
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/)
*/
namespace hidev\handlers;
use Yii;
* Handler for templated files.
class TemplateHandler extends BaseHandler
{
* {@inheritdoc}
public function renderPrepared(array $data)
return $this->getView()->render($this->template, $data);
}
public function renderTemplate($data)
return $this->renderPrepared(self::prepareData($data));
hidev\handlers\TemplateHandler::prepareData()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return $this->renderPrepared(self::/** @scrutinizer ignore-call */ prepareData($data));
public function prepareData($data)
return array_merge([
'app' => Yii::$app,
'config' => Yii::$app, /// DEPRECATED
'file' => $data->file,
'handler' => $this,
], parent::prepareData($data));
public function existsTemplate()
return $this->template && $this->getView()->existsTemplate($this->template);