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

sulu / SuluContentBundle / 11380658683

17 Oct 2024 07:50AM UTC coverage: 98.66% (-1.3%) from 100.0%
11380658683

Pull #271

github

web-flow
Merge a4038bc66 into a23a5b050
Pull Request #271: Draft: Base implementation of website content resolving

195 of 232 new or added lines in 13 files covered. (84.05%)

2725 of 2762 relevant lines covered (98.66%)

10.5 hits per line

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

25.0
/Content/Application/ResourceLoader/ResourceLoaderProvider.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of Sulu.
7
 *
8
 * (c) Sulu GmbH
9
 *
10
 * This source file is subject to the MIT license that is bundled
11
 * with this source code in the file LICENSE.
12
 */
13

14
namespace Sulu\Bundle\ContentBundle\Content\Application\ResourceLoader;
15

16
class ResourceLoaderProvider
17
{
18
    /**
19
     * @var ResourceLoaderInterface[]
20
     */
21
    private array $resourceLoaders;
22

23
    /**
24
     * @param iterable<ResourceLoaderInterface> $resourceLoaders
25
     */
26
    public function __construct(iterable $resourceLoaders)
27
    {
28
        $this->resourceLoaders = \iterator_to_array($resourceLoaders);
1✔
29
    }
30

31
    public function getResourceLoader(string $type): ?ResourceLoaderInterface
32
    {
NEW
33
        if (!\array_key_exists($type, $this->resourceLoaders)) {
×
NEW
34
            return null;
×
35
        }
36

NEW
37
        return $this->resourceLoaders[$type];
×
38
    }
39
}
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