for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created for IG Monitoring.
* User: jakim <[email protected]>
* Date: 2019-02-13
*/
namespace app\components\traits;
use app\models\Tag;
use yii\base\InvalidConfigException;
trait SetTagTrait
{
* @var \app\models\Tag
public $tag;
protected function throwExceptionIfTagIsEmpty()
if (!$this->tag instanceof Tag) {
$this->tag
app\models\Tag
throw new InvalidConfigException('Property \'tag\' must be set and be type of \'\app\models\Tag\'.');
}