Passed
Push — feature/51 ( ffcada...15fa2a )
by Max
02:30
created

Let::value()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace MaxGoryunov\SavingIterator\Fakes;
4
5
use Closure;
6
use MaxGoryunov\SavingIterator\Src\Scalar;
7
8
/**
9
 * Allows to use context instead of creating a new variable.
10
 * @template X subject type.
11
 * @template Y context result type.
12
 * @implements Scalar<Y>
13
 * 
14
 * @todo #44:25min Classes Let and The contain some repeated cdde which could
15
 *  be extracted into a separate class.
16
 */
17
class Let extends SurveyEnvelope
18
{
19
20
    /**
21
     * Ctor.
22
     *
23
     * @param             X $subject
0 ignored issues
show
Bug introduced by
The type MaxGoryunov\SavingIterator\Fakes\X was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24
     * @param Closure(X): Y $context
25
     */
26
    public function __construct(mixed $subject, Closure $context)
27
    {
28
        parent::__construct(
29
            $subject,
30
            $context,
31
            fn (mixed $subject, Closure $context): mixed => $context($subject)
32
        );
33
    }
34
}
35