Code Duplication    Length = 8-8 lines in 2 locations

src/GlobalState.php 2 locations

@@ 24-31 (lines=8) @@
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
    public static function decr(string $key, int $value = 1)
34
    {
@@ 33-40 (lines=8) @@
30
        self::$state[$key] += $value;
31
    }
32
33
    public static function decr(string $key, int $value = 1)
34
    {
35
        if (!isset(self::$state[$key])) {
36
            self::$state[$key] = 0;
37
        }
38
39
        self::$state[$key] -= $value;
40
    }
41
}
42