The::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 3
Metric Value
cc 1
eloc 5
c 4
b 0
f 3
nc 1
nop 1
dl 0
loc 6
rs 10
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