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.

Issues (201)

tests/Monoid/AppendTest.php (1 issue)

Labels
Severity
1
<?php
2
declare(strict_types = 1);
3
4
namespace Tests\Innmind\Immutable\Monoid;
5
6
use Innmind\Immutable\{
7
    Monoid\Append,
8
    Monoid,
9
    Sequence,
10
};
11
use PHPUnit\Framework\TestCase;
12
use Innmind\BlackBox\{
13
    PHPUnit\BlackBox,
14
    Set,
15
};
16
use Properties\Innmind\Immutable\Monoid as PMonoid;
17
18
class AppendTest extends TestCase
19
{
20
    use BlackBox;
21
22
    public function testInterface()
23
    {
24
        $this->assertInstanceOf(Monoid::class, Append::of());
25
    }
26
27
    public function testCombine()
28
    {
29
        $sequence = Append::of()->combine(
30
            Sequence::of(1, 3),
0 ignored issues
show
1 of type integer is incompatible with the type Innmind\Immutable\V expected by parameter $values of Innmind\Immutable\Sequence::of(). ( Ignorable by Annotation )

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

30
            Sequence::of(/** @scrutinizer ignore-type */ 1, 3),
Loading history...
31
            Sequence::of(2, 4),
32
        );
33
34
        $this->assertInstanceOf(Sequence::class, $sequence);
35
        $this->assertSame(
36
            [1, 3, 2, 4],
37
            $sequence->toList(),
38
        );
39
    }
40
41
    /**
42
     * @dataProvider properties
43
     */
44
    public function testHoldProperty($property)
45
    {
46
        $this
47
            ->forAll($property)
48
            ->then(static function($property) {
49
                $property->ensureHeldBy(Append::of());
50
            });
51
    }
52
53
    public function testHoldProperties()
54
    {
55
        $this
56
            ->forAll(PMonoid::properties($this->set(), $this->equals()))
57
            ->then(static function($properties) {
58
                $properties->ensureHeldBy(Append::of());
59
            });
60
    }
61
62
    public function properties(): iterable
63
    {
64
        foreach (PMonoid::list($this->set(), $this->equals()) as $property) {
65
            yield [$property];
66
        }
67
    }
68
69
    public function equals(): callable
70
    {
71
        return static fn($a, $b) => $a->equals($b);
72
    }
73
74
    private function set(): Set
75
    {
76
        return Set\Decorate::immutable(
77
            static fn($values) => Sequence::of(...$values),
78
            Set\Sequence::of(Set\AnyType::any()),
79
        );
80
    }
81
}
82