Code Duplication    Length = 8-8 lines in 2 locations

src/GlobalState.php 2 locations

@@ 31-38 (lines=8) @@
28
        self::$state[$key] = $value;
29
    }
30
31
    public static function incr(string $key, int $value = 1)
32
    {
33
        if (!isset(self::$state[$key])) {
34
            self::$state[$key] = 0;
35
        }
36
37
        self::$state[$key] += $value;
38
    }
39
40
    public static function decr(string $key, int $value = 1)
41
    {
@@ 40-47 (lines=8) @@
37
        self::$state[$key] += $value;
38
    }
39
40
    public static function decr(string $key, int $value = 1)
41
    {
42
        if (!isset(self::$state[$key])) {
43
            self::$state[$key] = 0;
44
        }
45
46
        self::$state[$key] -= $value;
47
    }
48
}
49