kylekatarnls/jade-php

View on GitHub
src/Pug/Filter/WrapTagTrait.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Pug\Filter;

trait WrapTagTrait
{
    public function wrapInTag($code)
    {
        if (isset($this->tag)) {
            $code = '<' . $this->tag . (isset($this->textType) ? ' type="text/' . $this->textType . '"' : '') . '>' .
                $code .
                '</' . $this->tag . '>';
        }

        return $code;
    }
}