• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Cecilapp / Cecil / 13755086748

10 Mar 2025 01:50AM UTC coverage: 82.973% (-0.4%) from 83.394%
13755086748

Pull #2133

github

web-flow
Merge e69a25662 into a9fd56ab7
Pull Request #2133: refactor: better cache

69 of 79 new or added lines in 9 files covered. (87.34%)

21 existing lines in 5 files now uncovered.

2953 of 3559 relevant lines covered (82.97%)

0.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/Renderer/TwigCacheRuntimeLoader.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of Cecil.
7
 *
8
 * Copyright (c) Arnaud Ligny <arnaud@ligny.fr>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13

14
namespace Cecil\Renderer;
15

16
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
17
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
18
use Twig\Extra\Cache\CacheRuntime;
19
use Twig\RuntimeLoader\RuntimeLoaderInterface;
20

21
class TwigCacheRuntimeLoader implements RuntimeLoaderInterface
22
{
23
    protected string $cacheDir;
24

25
    public function __construct(string $cacheDir)
26
    {
27
        $this->cacheDir = $cacheDir;
1✔
28
    }
29

30
    public function load(string $class)
31
    {
32
        if (CacheRuntime::class === $class) {
1✔
33
            return new CacheRuntime(new TagAwareAdapter(new FilesystemAdapter(namespace: '_fragments', directory: $this->cacheDir)));
1✔
34
        }
35

NEW
36
        return null;
×
37
    }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc