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

adbrosaci / remote-image-processor / 13011791920

28 Jan 2025 01:43PM UTC coverage: 68.571%. Remained the same
13011791920

push

github

martenb
feat: allow nette/utils v4

0 of 1 new or added line in 1 file covered. (0.0%)

8 existing lines in 3 files now uncovered.

24 of 35 relevant lines covered (68.57%)

0.69 hits per line

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

92.31
/src/DI/Extension.php
1
<?php declare(strict_types = 1);
2

3
namespace Adbros\RemoteImageProcessor\DI;
4

5
use Adbros\RemoteImageProcessor\Template\Filters;
6
use Nette\Bridges\ApplicationLatte\ILatteFactory;
7
use Nette\DI\CompilerExtension;
8

9
class Extension extends CompilerExtension
10
{
11

12
        /** @var mixed[] */
13
        private array $defaults = [
14
                'service' => null,
15
                'aliases' => [],
16
        ];
17

18
        public function loadConfiguration(): void
19
        {
20
                $this->validateConfig($this->defaults);
1✔
21

22
                $builder = $this->getContainerBuilder();
1✔
23

24
                $builder->addDefinition($this->prefix('service'))
1✔
25
                        ->setFactory($this->config['service'])
1✔
26
                        ->addSetup('setAliases', [$this->config['aliases']]);
1✔
27

28
                $filtersService = $builder->addDefinition($this->prefix('filters'))
1✔
29
                        ->setFactory(Filters::class);
1✔
30

31
                $definition = $builder->getDefinitionByType(ILatteFactory::class);
1✔
32

33
                if (method_exists($definition, 'getResultDefinition')) {
1✔
34
                        $definition
35
                                ->getResultDefinition()
1✔
36
                                ->addSetup('addFilter', ['image', [$filtersService, 'processImage']]);
1✔
37
                } else {
38
                        /** @phpstan-ignore method.notFound */
39
                        $definition
UNCOV
40
                                ->addSetup('addFilter', ['image', [$filtersService, 'processImage']]);
×
41
                }
42
        }
1✔
43

44
}
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