Passed
Pull Request — master (#405)
by Kirill
08:21 queued 04:03
created

MergeReader::each()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
/**
4
 * This file is part of Spiral Framework package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Attributes\Composite;
13
14
final class MergeReader extends Composite
15
{
16
    /**
17
     * {@inheritDoc}
18
     */
19
    protected function each(callable $resolver): iterable
20
    {
21
        foreach ($this->readers as $reader) {
22
            yield from $resolver($reader);
23
        }
24
    }
25
}
26