Completed
Push — master ( da2f6e...d3b8cb )
by Kamil
20:06
created

SitemapRenderer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A render() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Sylius\Bundle\CoreBundle\Sitemap\Renderer;
13
14
use Sylius\Bundle\CoreBundle\Sitemap\Model\SitemapInterface;
15
16
/**
17
 * @author Arkadiusz Krakowiak <[email protected]>
18
 */
19
class SitemapRenderer implements SitemapRendererInterface
20
{
21
    /**
22
     * @var RendererAdapterInterface
23
     */
24
    private $adapter;
25
26
    /**
27
     * @param RendererAdapterInterface $adapter
28
     * @param array $configuration
29
     */
30
    public function __construct(RendererAdapterInterface $adapter, array $configuration = [])
31
    {
32
        $this->adapter = $adapter;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function render(SitemapInterface $sitemap)
39
    {
40
        return $this->adapter->render($sitemap);
41
    }
42
}
43