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

AbstractSeoGenerator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 3
c 1
b 1
f 0
lcom 1
cbo 1
dl 0
loc 33
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A render() 0 4 1
A __toString() 0 4 1
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