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

sanmai / console / 15941451449

28 Jun 2025 06:38AM UTC coverage: 94.828% (-2.8%) from 97.619%
15941451449

Pull #7

github

web-flow
Merge 55426d93a into 4553be0c0
Pull Request #7: Add an option use a CommandProvider directly

15 of 17 new or added lines in 3 files covered. (88.24%)

55 of 58 relevant lines covered (94.83%)

8.55 hits per line

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

0.0
/src/CommandProviderProvider.php
1
<?php
2

3
/**
4
 * Copyright 2025 Alexey Kopytko <alexey@kopytko.com>
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 * http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18

19
declare(strict_types=1);
20

21
namespace ConsoleApp;
22

23
use IteratorAggregate;
24
use Symfony\Component\Console\Command\Command;
25
use Traversable;
26
use Override;
27

28
use function Pipeline\take;
29

30
/**
31
 * @implements IteratorAggregate<Command>
32
 */
33
final class CommandProviderProvider implements IteratorAggregate, CommandProviderInterface
34
{
35
    /** @var array<CommandProviderInterface> */
36
    private readonly array $providers;
37

38
    public function __construct(
39
        CommandProviderInterface ...$providers,
40
    ) {
NEW
41
        $this->providers = $providers;
×
42
    }
43

44
    #[Override]
45
    public function getIterator(): Traversable
46
    {
NEW
47
        return take(...$this->providers);
×
48
    }
49
}
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