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

Q::on()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 15
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
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 Q.
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 Q extends Combinator
21
{
22
    /**
23
     * @return Closure(callable(NewAType): NewBType): Closure(callable(NewBType): NewCType):Closure(NewAType): NewCType
24
     */
25 2
    public function __invoke(): Closure
26
    {
27
        return
28
            /**
29
             * @param callable(NewAType): NewBType $f
30
             *
31
             * @return Closure(callable(NewBType): NewCType):Closure(NewAType): NewCType
32
             */
33
            static function (callable $f): Closure {
34
                return
35
                    /**
36
                     * @param callable(NewBType): NewCType $g
37
                     *
38
                     * @return Closure(NewAType): NewCType
39
                     */
40
                    static function (callable $g) use ($f): Closure {
41
                        return
42
                            /**
43
                             * @param NewAType $x
0 ignored issues
show
Bug introduced by
The type loophp\combinator\Combinator\NewAType 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...
44
                             *
45
                             * @return NewCType
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...
46
                             */
47
                            static function ($x) use ($f, $g) {
48 2
                                return ($g)((($f)($x)));
49 2
                            };
50 2
                    };
51 2
            };
52
    }
53
}
54