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.

Nothing::match()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
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\Maybe;
5
6
use Innmind\Immutable\Maybe;
7
8
/**
9
 * @psalm-immutable
10
 * @internal
11
 */
12
final class Nothing implements Implementation
13
{
14
    public function map(callable $map): self
15
    {
16
        return $this;
17
    }
18
19
    public function flatMap(callable $map): Maybe
20
    {
21
        return Maybe::nothing();
22
    }
23
24
    public function match(callable $just, callable $nothing)
25
    {
26
        return $nothing();
27
    }
28
29
    public function otherwise(callable $otherwise): Maybe
30
    {
31
        return $otherwise();
32
    }
33
34
    public function filter(callable $predicate): self
35
    {
36
        return $this;
37
    }
38
}
39