Completed
Branch master (0b86d9)
by Léo
02:17
created

AbstractSeoGenerator::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Leogout\Bundle\SeoBundle\Seo;
4
5
use Leogout\Bundle\SeoBundle\Builder\TagBuilder;
6
use Leogout\Bundle\SeoBundle\Model\RenderableInterface;
7
8
/**
9
 * Description of AbstractSeoGenerator.
10
 *
11
 * @author: leogout
12
 */
13
abstract class AbstractSeoGenerator implements RenderableInterface
14
{
15
    /**
16
     * @var TagBuilder
17
     */
18
    protected $tagBuilder;
19
20
    /**
21
     * BasicSeoBuilder constructor.
22
     *
23
     * @param TagBuilder $tagBuilder
24
     */
25
    public function __construct(TagBuilder $tagBuilder)
26
    {
27
        $this->tagBuilder = $tagBuilder;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function render()
34
    {
35
        return $this->tagBuilder->render();
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function __toString()
42
    {
43
        return $this->render();
44
    }
45
}
46