Completed
Push — develop ( 80740b...61b5c3 )
by Mike
10:20
created

Twig   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace phpDocumentor\Application\Stage;
6
7
use Twig\Environment;
8
9
final class Twig
10
{
11
    /** @var Environment */
12
    private $twig;
13
14
    public function __construct(Environment $twig)
15
    {
16
        $this->twig = $twig;
17
    }
18
19
    public function __invoke(array $configuration): array
20
    {
21
        // set the cache directory to be a subdirectory of phpDocumentor's cache, this will make it configurable
22
        // to be per-project instead of system-wide.
23
        $this->twig->setCache((string)$configuration['phpdocumentor']['paths']['cache'] . '/twig');
24
25
        return $configuration;
26
    }
27
}
28