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.

Append::identity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

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

25
    public static function of(/** @scrutinizer ignore-unused */ string $class = 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...
26
    {
27
        /** @var self<C> */
28
        return new self;
29
    }
30
31
    public function identity(): mixed
32
    {
33
        /** @var Sequence<T> */
34
        return Sequence::of();
35
    }
36
37
    /**
38
     * @param Sequence<T> $a
39
     * @param Sequence<T> $b
40
     *
41
     * @return Sequence<T>
42
     */
43
    public function combine(mixed $a, mixed $b): mixed
44
    {
45
        return $a->append($b);
46
    }
47
}
48