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.
Completed
Push — master ( 6b8c9f...2772bf )
by Cees-Jan
07:29
created

GlobalState::incr()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\React\Inspector\F42;
4
5
final class GlobalState
6
{
7
    static protected $state = [];
8
9
    public static function get(): array
10
    {
11
        return self::$state;
12
    }
13
14
    public static function reset()
15
    {
16
        self::$state = [];
17
    }
18
19
    public static function set(string $key, int $value)
20
    {
21
        self::$state[$key] = $value;
22
    }
23
24
    public static function incr(string $key, int $value = 1)
25
    {
26
        if (!isset(self::$state[$key])) {
27
            self::$state[$key] = 0;
28
        }
29
30
        self::$state[$key] += $value;
31
    }
32
}
33