Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
GraphiteDesignSystemLayout
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 __construct
n/a
0 / 0
n/a
0 / 0
1
 createRenderer
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\CmsLayoutGraphite;
3
4use Apie\HtmlBuilders\Assets\AssetManager;
5use Apie\TwigTemplateLayoutRenderer\TwigRenderer;
6
7final class GraphiteDesignSystemLayout
8{
9    /**
10     * @codeCoverageIgnore
11     */
12    private function __construct()
13    {
14    }
15
16    public static function createRenderer(?AssetManager $assetManager = null): TwigRenderer
17    {
18        $assetManager ??= new AssetManager();
19        return new TwigRenderer(
20            __DIR__ . '/../resources/templates',
21            $assetManager->withAddedPath(__DIR__ . '/../resources/assets'),
22            'Apie\HtmlBuilders\Components\\'
23        );
24    }
25}