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 = 100-100 lines in 2 locations

src/Service/Elevation/Response/ElevationResponse.php 1 location

@@ 17-116 (lines=100) @@
14
/**
15
 * @author GeLo <[email protected]>
16
 */
17
class ElevationResponse
18
{
19
    /**
20
     * @var string|null
21
     */
22
    private $status;
23
24
    /**
25
     * @var ElevationResult[]
26
     */
27
    private $results = [];
28
29
    /**
30
     * @return bool
31
     */
32
    public function hasStatus()
33
    {
34
        return $this->status !== null;
35
    }
36
37
    /**
38
     * @return string|null
39
     */
40
    public function getStatus()
41
    {
42
        return $this->status;
43
    }
44
45
    /**
46
     * @param string|null $status
47
     */
48
    public function setStatus($status)
49
    {
50
        $this->status = $status;
51
    }
52
53
    /**
54
     * @return bool
55
     */
56
    public function hasResults()
57
    {
58
        return !empty($this->results);
59
    }
60
61
    /**
62
     * @return ElevationResult[]
63
     */
64
    public function getResults()
65
    {
66
        return $this->results;
67
    }
68
69
    /**
70
     * @param ElevationResult[] $results
71
     */
72
    public function setResults(array $results)
73
    {
74
        $this->results = [];
75
        $this->addResults($results);
76
    }
77
78
    /**
79
     * @param ElevationResult[] $results
80
     */
81
    public function addResults(array $results)
82
    {
83
        foreach ($results as $result) {
84
            $this->addResult($result);
85
        }
86
    }
87
88
    /**
89
     * @param ElevationResult $result
90
     *
91
     * @return bool
92
     */
93
    public function hasResult(ElevationResult $result)
94
    {
95
        return in_array($result, $this->results, true);
96
    }
97
98
    /**
99
     * @param ElevationResult $result
100
     */
101
    public function addResult(ElevationResult $result)
102
    {
103
        if (!$this->hasResult($result)) {
104
            $this->results[] = $result;
105
        }
106
    }
107
108
    /**
109
     * @param ElevationResult $result
110
     */
111
    public function removeResult(ElevationResult $result)
112
    {
113
        unset($this->results[array_search($result, $this->results, true)]);
114
        $this->results = array_values($this->results);
115
    }
116
}
117

src/Service/Geocoder/Response/GeocoderResponse.php 1 location

@@ 17-116 (lines=100) @@
14
/**
15
 * @author GeLo <[email protected]>
16
 */
17
class GeocoderResponse
18
{
19
    /**
20
     * @var string|null
21
     */
22
    private $status;
23
24
    /**
25
     * @var GeocoderResult[]
26
     */
27
    private $results = [];
28
29
    /**
30
     * @return bool
31
     */
32
    public function hasStatus()
33
    {
34
        return $this->status !== null;
35
    }
36
37
    /**
38
     * @return string|null
39
     */
40
    public function getStatus()
41
    {
42
        return $this->status;
43
    }
44
45
    /**
46
     * @param string|null $status
47
     */
48
    public function setStatus($status = null)
49
    {
50
        $this->status = $status;
51
    }
52
53
    /**
54
     * @return bool
55
     */
56
    public function hasResults()
57
    {
58
        return !empty($this->results);
59
    }
60
61
    /**
62
     * @return GeocoderResult[]
63
     */
64
    public function getResults()
65
    {
66
        return $this->results;
67
    }
68
69
    /**
70
     * @param GeocoderResult[] $results
71
     */
72
    public function setResults(array $results)
73
    {
74
        $this->results = [];
75
        $this->addResults($results);
76
    }
77
78
    /**
79
     * @param GeocoderResult[] $results
80
     */
81
    public function addResults(array $results)
82
    {
83
        foreach ($results as $result) {
84
            $this->addResult($result);
85
        }
86
    }
87
88
    /**
89
     * @param GeocoderResult $result
90
     *
91
     * @return bool
92
     */
93
    public function hasResult(GeocoderResult $result)
94
    {
95
        return in_array($result, $this->results, true);
96
    }
97
98
    /**
99
     * @param GeocoderResult $result
100
     */
101
    public function addResult(GeocoderResult $result)
102
    {
103
        if (!$this->hasResult($result)) {
104
            $this->results[] = $result;
105
        }
106
    }
107
108
    /**
109
     * @param GeocoderResult $result
110
     */
111
    public function removeResult(GeocoderResult $result)
112
    {
113
        unset($this->results[array_search($result, $this->results, true)]);
114
        $this->results = array_values($this->results);
115
    }
116
}
117