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

tempestphp / tempest-framework / 12021710761

25 Nov 2024 06:54PM UTC coverage: 79.441% (-2.6%) from 81.993%
12021710761

push

github

web-flow
ci: close stale issues and pull requests

7879 of 9918 relevant lines covered (79.44%)

61.32 hits per line

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

72.73
/src/Tempest/Core/src/ConfigCache.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Core;
6

7
use Psr\Cache\CacheItemPoolInterface;
8
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
9
use Tempest\Cache\Cache;
10
use Tempest\Cache\IsCache;
11
use function Tempest\env;
12

13
final readonly class ConfigCache implements Cache
14
{
15
    use IsCache;
16

17
    private CacheItemPoolInterface $pool;
18

19
    public function __construct()
382✔
20
    {
21
        $this->pool = new FilesystemAdapter(
382✔
22
            directory: __DIR__ . '/.cache',
382✔
23
        );
382✔
24
    }
25

26
    protected function getCachePool(): CacheItemPoolInterface
×
27
    {
28
        return $this->pool;
×
29
    }
30

31
    public function isEnabled(): bool
382✔
32
    {
33
        $shouldCache = env('CACHE');
382✔
34

35
        if ($shouldCache === null) {
382✔
36
            return env('CONFIG_CACHE', false);
382✔
37
        }
38

39
        return $shouldCache;
×
40
    }
41
}
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