Passed
Push — di ( 61d74f...f00c6d )
by Arnaud
15:03 queued 11:43
created

TwigFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of Cecil.
5
 *
6
 * (c) Arnaud Ligny <[email protected]>
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
declare(strict_types=1);
13
14
namespace Cecil\Renderer;
15
16
use Cecil\Builder;
17
18
/**
19
 * TwigFactory class.
20
 *
21
 * Factory for creating Twig renderer instances with proper configuration.
22
 */
23
class TwigFactory
24
{
25
    /**
26
     * Creates a Twig renderer instance.
27
     *
28
     * @param Builder $builder The builder instance
29
     * @param array|string $templatesPath Templates path(s)
30
     * @return Twig The configured Twig renderer
31
     */
32
    public function create(Builder $builder, $templatesPath): Twig
33
    {
34
        return new Twig($builder, $templatesPath);
35
    }
36
}
37