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

overblog / GraphQLBundle / 9327433727

10 May 2024 01:06PM UTC coverage: 98.364%. Remained the same
9327433727

push

github

web-flow
Merge pull request #1184 from joesaunderson/patch-1

Don't validate fields that were not passed

2 of 2 new or added lines in 1 file covered. (100.0%)

4330 of 4402 relevant lines covered (98.36%)

40.0 hits per line

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

88.89
/src/Definition/ConfigProcessor.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Overblog\GraphQLBundle\Definition;
6

7
use Overblog\GraphQLBundle\Definition\ConfigProcessor\ConfigProcessorInterface;
8

9
final class ConfigProcessor
10
{
11
    /**
12
     * @var ConfigProcessorInterface[]
13
     */
14
    private array $processors = [];
15

16
    public function __construct(iterable $processors)
17
    {
18
        foreach ($processors as $processor) {
125✔
19
            $this->register($processor);
125✔
20
        }
21
    }
125✔
22

23
    public function getProcessors(): array
24
    {
25
        return $this->processors;
×
26
    }
27

28
    public function register(ConfigProcessorInterface $configProcessor): void
29
    {
30
        $this->processors[] = $configProcessor;
125✔
31
    }
125✔
32

33
    /**
34
     * @phpstan-template T of array
35
     *
36
     * @phpstan-param T $config
37
     *
38
     * @phpstan-return T
39
     */
40
    public function process(array $config): array
41
    {
42
        foreach ($this->processors as $processor) {
124✔
43
            $config = $processor->process($config);
124✔
44
        }
45

46
        return $config;
124✔
47
    }
48
}
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