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

daycry / doctrine / 19709863448

26 Nov 2025 04:00PM UTC coverage: 75.815% (-1.0%) from 76.782%
19709863448

push

github

daycry
- Improvements

69 of 96 new or added lines in 3 files covered. (71.88%)

442 of 583 relevant lines covered (75.81%)

18.15 hits per line

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

0.0
/src/Debug/Filters/DoctrineSlcReset.php
1
<?php
2

3
namespace Daycry\Doctrine\Debug\Filters;
4

5
use CodeIgniter\Filters\FilterInterface;
6
use CodeIgniter\HTTP\RequestInterface;
7
use CodeIgniter\HTTP\ResponseInterface;
8

9
class DoctrineSlcReset implements FilterInterface
10
{
11
    public function before(RequestInterface $request, $arguments = null)
12
    {
13
        // Only reset in development environment
NEW
14
        if (defined('ENVIRONMENT') && ENVIRONMENT !== 'development') {
×
NEW
15
            return;
×
16
        }
NEW
17
        if (class_exists('Config\\Services') && method_exists(\Config\Services::class, 'doctrine')) {
×
NEW
18
            $doctrine = \Config\Services::doctrine();
×
NEW
19
            if (method_exists($doctrine, 'resetSecondLevelCacheStatistics')) {
×
NEW
20
                $doctrine->resetSecondLevelCacheStatistics();
×
21
            }
22
        }
23
    }
24

25
    public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
26
    {
27
        // no-op
NEW
28
    }
×
29
}
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