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

liip / LiipImagineBundle / 10701363663

04 Sep 2024 12:11PM UTC coverage: 81.688% (-0.06%) from 81.746%
10701363663

push

github

web-flow
Merge pull request #1610 from liip/cs-fix

apply latest cs fixer

67 of 84 new or added lines in 42 files covered. (79.76%)

2 existing lines in 1 file now uncovered.

2275 of 2785 relevant lines covered (81.69%)

103.1 hits per line

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

0.0
/Config/FilterFactoryCollection.php
1
<?php
2

3
/*
4
 * This file is part of the `liip/LiipImagineBundle` project.
5
 *
6
 * (c) https://github.com/liip/LiipImagineBundle/graphs/contributors
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11

12
namespace Liip\ImagineBundle\Config;
13

14
use Liip\ImagineBundle\Exception\Config\Filter\NotFoundException;
15
use Liip\ImagineBundle\Factory\Config\FilterFactoryInterface;
16

17
class FilterFactoryCollection
18
{
19
    /**
20
     * @var FilterFactoryInterface[]
21
     */
22
    private $filterFactories = [];
23

24
    public function __construct(FilterFactoryInterface ...$filterFactories)
25
    {
26
        foreach ($filterFactories as $filterFactory) {
×
27
            $this->filterFactories[$filterFactory->getName()] = $filterFactory;
×
28
        }
29
    }
30

31
    /**
32
     * @throws NotFoundException
33
     */
34
    public function getFilterFactoryByName(string $name): FilterFactoryInterface
35
    {
36
        if (!isset($this->filterFactories[$name])) {
×
NEW
37
            throw new NotFoundException(\sprintf("Filter factory with name '%s' was not found.", $name));
×
38
        }
39

40
        return $this->filterFactories[$name];
×
41
    }
42

43
    /**
44
     * @return FilterFactoryInterface[]
45
     */
46
    public function getAll()
47
    {
48
        return $this->filterFactories;
×
49
    }
50
}
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

© 2025 Coveralls, Inc