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

tito10047 / progressive-image-bundle / 20660774589

02 Jan 2026 03:17PM UTC coverage: 88.816% (+0.8%) from 88.049%
20660774589

push

github

tito10047
add transparent HTML caching: implement caching for rendered image components, update services, configuration, tests, and documentation

39 of 40 new or added lines in 4 files covered. (97.5%)

63 existing lines in 6 files now uncovered.

540 of 608 relevant lines covered (88.82%)

160.76 hits per line

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

100.0
/src/Service/LiipImagineRuntimeConfigGenerator.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tito10047\ProgressiveImageBundle\Service;
6

7
use Liip\ImagineBundle\Exception\Imagine\Filter\NonExistingFilterException;
8
use Liip\ImagineBundle\Imagine\Filter\FilterConfiguration;
9

10
class LiipImagineRuntimeConfigGenerator
11
{
12
        public function __construct(
13
                private readonly FilterConfiguration $filterConfiguration,
14
        ) {
UNCOV
15
        }
294✔
16

17
        /**
18
         * @return array{filterName: string, config: array<string, mixed>}
19
         */
20
        public function generate(int $width, int $height, ?string $filter = null): array
21
        {
UNCOV
22
                $filterName = $filter ? sprintf('%s_%dx%d', $filter, $width, $height) : sprintf('%dx%d', $width, $height);
182✔
23

UNCOV
24
                $config = [];
182✔
UNCOV
25
                if ($filter !== null) {
182✔
26
                        try {
UNCOV
27
                                $config = $this->filterConfiguration->get($filter);
42✔
UNCOV
28
                        } catch (NonExistingFilterException) {
14✔
29
                        }
30
                }
31

UNCOV
32
                if (!isset($config['filters'])) {
182✔
UNCOV
33
                        $config['filters'] = [];
154✔
34
                }
35

UNCOV
36
                $config['filters']['thumbnail'] = [
182✔
UNCOV
37
                        'size' => [$width, $height],
182✔
UNCOV
38
                        'mode' => 'outbound',
182✔
UNCOV
39
                ];
182✔
40

UNCOV
41
                return [
182✔
UNCOV
42
                        'filterName' => $filterName,
182✔
UNCOV
43
                        'config' => $config,
182✔
UNCOV
44
                ];
182✔
45
        }
46
}
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