Passed
Push — 146 ( a60514...fd2fad )
by Max
02:23
created

The::act()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace MaxGoryunov\SavingIterator\Fakes;
4
5
use Closure;
6
7
/**
8
 * Class for applying contexts to elements without changing them.
9
 * @template T subject type
10
 * @extends SurveyEnvelope<T, T>
11
 */
12
class The extends SurveyEnvelope
13
{
14
15
    /**
16
     * Ctor.
17
     *
18
     * @phpstan-param T $subject
19
     * @param mixed $subject repeating element.
20
     */
21
    public function __construct(mixed $subject) {
22
        parent::__construct(
23
            $subject,
24
            function (mixed $subject, Closure $context): mixed {
25
                $context($subject);
26
                return $subject;
27
            }
28
        );
29
    }
30
}
31