Passed
Push — master ( defd4e...35ff3b )
by Pol
06:10 queued 03:00
created

Psi::on()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
nc 1
nop 1
dl 0
loc 22
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace loophp\combinator\Combinator;
6
7
use Closure;
8
use loophp\combinator\Combinator;
9
10
/**
11
 * Class Psi.
12
 *
13
 * @template NewAType
14
 * @template NewBType
15
 * @template NewCType
16
 *
17
 * phpcs:disable Generic.Files.LineLength.TooLong
18
 * phpcs:disable Generic.WhiteSpace.ScopeIndent.IncorrectExact
19
 */
20
final class Psi extends Combinator
21
{
22
    /**
23
     * @return Closure(callable(NewAType): callable(NewAType): NewBType): Closure(callable(NewCType): NewAType): Closure(NewCType): Closure(NewCType): NewBType
24
     */
25 2
    public function __invoke(): Closure
26
    {
27
        return
28
            /**
29
             * @param callable(NewAType): callable(NewAType): NewBType $f
30
             *
31
             * @return Closure(callable(NewCType): NewAType): Closure(NewCType): Closure(NewCType): NewBType
32
             */
33
            static function (callable $f): Closure {
34
                return
35
                    /**
36
                     * @param callable(NewCType): NewAType $g
37
                     *
38
                     * @return Closure(NewCType): Closure(NewCType): NewBType
39
                     */
40
                    static function (callable $g) use ($f): Closure {
41
                        return
42
                            /**
43
                             * @param NewCType $x
44
                             *
45
                             * @return Closure(NewCType): NewBType
46
                             */
47
                            static function ($x) use ($f, $g): Closure {
48
                                return
49
                                    /**
50
                                     * @param NewCType $y
0 ignored issues
show
Bug introduced by
The type loophp\combinator\Combinator\NewCType 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...
51
                                     *
52
                                     * @return NewBType
0 ignored issues
show
Bug introduced by
The type loophp\combinator\Combinator\NewBType 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...
53
                                     */
54
                                    static function ($y) use ($f, $g, $x) {
55 2
                                        return ($f)(($g)($x))(($g)($y));
56 2
                                    };
57 2
                            };
58 2
                    };
59 2
            };
60
    }
61
}
62