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.

Code Duplication    Length = 22-22 lines in 2 locations

src/Common/JsonSchema/JsonPatch.php 1 location

@@ 56-77 (lines=22) @@
53
        return $changes;
54
    }
55
56
    protected function handleObject($srcStruct, $desStruct, $path)
57
    {
58
        $changes = [];
59
60
        if ($this->shouldPartiallyReplace($srcStruct, $desStruct)) {
61
            foreach ($desStruct as $key => $val) {
62
                if (!property_exists($srcStruct, $key)) {
63
                    $changes[] = $this->makePatch(self::OP_ADD, $this->path($path, $key), $val);
64
                } elseif ($srcStruct->$key != $val) {
65
                    $changes = array_merge($changes, $this->makeDiff($srcStruct->$key, $val, $this->path($path, $key)));
66
                }
67
            }
68
        } elseif ($this->shouldPartiallyReplace($desStruct, $srcStruct)) {
69
            foreach ($srcStruct as $key => $val) {
70
                if (!property_exists($desStruct, $key)) {
71
                    $changes[] = $this->makePatch(self::OP_REMOVE, $this->path($path, $key));
72
                }
73
            }
74
        }
75
76
        return $changes;
77
    }
78
79
    protected function shouldPartiallyReplace($o1, $o2)
80
    {

src/Images/v2/JsonPatch.php 1 location

@@ 24-45 (lines=22) @@
21
     * We need to override the proper way to handle objects because Glance v2 does not
22
     * support whole document replacement with empty JSON pointers.
23
     */
24
    protected function handleObject($srcStruct, $desStruct, $path)
25
    {
26
        $changes = [];
27
28
        foreach ($desStruct as $key => $val) {
29
            if (!property_exists($srcStruct, $key)) {
30
                $changes[] = $this->makePatch(self::OP_ADD, $this->path($path, $key), $val);
31
            } elseif ($srcStruct->$key != $val) {
32
                $changes = array_merge($changes, $this->makeDiff($srcStruct->$key, $val, $this->path($path, $key)));
33
            }
34
        }
35
36
        if ($this->shouldPartiallyReplace($desStruct, $srcStruct)) {
37
            foreach ($srcStruct as $key => $val) {
38
                if (!property_exists($desStruct, $key)) {
39
                    $changes[] = $this->makePatch(self::OP_REMOVE, $this->path($path, $key));
40
                }
41
            }
42
        }
43
44
        return $changes;
45
    }
46
47
    protected function handleArray($srcStruct, $desStruct, $path)
48
    {