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   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 25
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A map() 0 3 1
A flatMap() 0 3 1
A match() 0 3 1
A filter() 0 3 1
A otherwise() 0 3 1
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