Code Duplication    Length = 7-9 lines in 4 locations

src/Devices.php 1 location

@@ 191-198 (lines=8) @@
188
     *
189
     * @return array
190
     */
191
    public function csvExport()
192
    {
193
        return $this->api->request('POST', '/players/csv_export', [
194
            'Authorization' => 'Basic ' . $this->api->getConfig()->getApplicationAuthKey(),
195
        ], json_encode([
196
            'app_id' => $this->api->getConfig()->getApplicationId(),
197
        ]));
198
    }
199
200
    protected function resolve(array $data, callable $callback = null)
201
    {

src/Notifications.php 3 locations

@@ 68-74 (lines=7) @@
65
     *
66
     * @return array
67
     */
68
    public function add(array $data)
69
    {
70
        return $this->api->request('POST', '/notifications', [
71
            'Authorization' => 'Basic ' . $this->api->getConfig()->getApplicationAuthKey(),
72
            'Content-Type' => 'application/json',
73
        ], json_encode($this->resolve($data)));
74
    }
75
76
    /**
77
     * Open notification.
@@ 85-93 (lines=9) @@
82
     *
83
     * @return array
84
     */
85
    public function open($id)
86
    {
87
        return $this->api->request('PUT', '/notifications/' . $id, [
88
            'Authorization' => 'Basic ' . $this->api->getConfig()->getApplicationAuthKey(),
89
        ], json_encode([
90
            'app_id' => $this->api->getConfig()->getApplicationId(),
91
            'opened' => true,
92
        ]));
93
    }
94
95
    /**
96
     * Cancel notification.
@@ 104-111 (lines=8) @@
101
     *
102
     * @return array
103
     */
104
    public function cancel($id)
105
    {
106
        return $this->api->request('DELETE', '/notifications/' . $id, [
107
            'Authorization' => 'Basic ' . $this->api->getConfig()->getApplicationAuthKey(),
108
        ], json_encode([
109
            'app_id' => $this->api->getConfig()->getApplicationId(),
110
        ]));
111
    }
112
113
    protected function resolve(array $data)
114
    {