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

Twig::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
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