GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

MergeMap::combine()   A
last analyzed

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 2
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Immutable\Monoid;
5
6
use Innmind\Immutable\{
7
    Monoid,
8
    Map,
9
};
10
11
/**
12
 * @template T
13
 * @template U
14
 * @psalm-immutable
15
 * @implements Monoid<Map<T, U>>
16
 */
17
final class MergeMap implements Monoid
18
{
19
    /**
20
     * @template A of object
21
     * @template B of object
22
     *
23
     * @param class-string<A> $key
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string<A> at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<A>.
Loading history...
24
     * @param class-string<B> $value
25
     *
26
     * @return self<A, B>
27
     */
28
    public static function of(string $key = null, string $value = null): self
0 ignored issues
show
Unused Code introduced by
The parameter $value is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public static function of(string $key = null, /** @scrutinizer ignore-unused */ string $value = null): self

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $key is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public static function of(/** @scrutinizer ignore-unused */ string $key = null, string $value = null): self

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30
        /** @var self<A, B> */
31
        return new self;
32
    }
33
34
    public function identity(): mixed
35
    {
36
        /** @var Map<T, U> */
37
        return Map::of();
38
    }
39
40
    /**
41
     * @param Map<T, U> $a
42
     * @param Map<T, U> $b
43
     *
44
     * @return Map<T, U>
45
     */
46
    public function combine(mixed $a, mixed $b): mixed
47
    {
48
        return $a->merge($b);
49
    }
50
}
51