Code Duplication    Length = 8-10 lines in 3 locations

src/Devices.php 1 location

@@ 122-131 (lines=10) @@
119
     *
120
     * @return array
121
     */
122
    public function delete($id)
123
    {
124
        $query = [
125
            'app_id' => $this->api->getConfig()->getApplicationId(),
126
        ];
127
128
        return $this->api->request('DELETE', '/players/'.$id.'?'.http_build_query($query), [
129
            'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(),
130
        ]);
131
    }
132
    
133
    /**
134
     * Call on new device session in your app.

src/Notifications.php 2 locations

@@ 30-37 (lines=8) @@
27
     *
28
     * @return array
29
     */
30
    public function getOne($id)
31
    {
32
        $url = '/notifications/'.$id.'?app_id='.$this->api->getConfig()->getApplicationId();
33
34
        return $this->api->request('GET', $url, [
35
            'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(),
36
        ]);
37
    }
38
39
    /**
40
     * Get information about all notifications.
@@ 108-115 (lines=8) @@
105
     *
106
     * @return array
107
     */
108
    public function cancel($id)
109
    {
110
        $url = '/notifications/'.$id.'?app_id='.$this->api->getConfig()->getApplicationId();
111
112
        return $this->api->request('DELETE', $url, [
113
            'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(),
114
        ]);
115
    }
116
}
117