Code Duplication    Length = 8-10 lines in 3 locations

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
    /**
118
     * View the devices sent a notification.

src/Devices.php 1 location

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