Code Duplication    Length = 8-8 lines in 3 locations

src/Apps.php 2 locations

@@ 70-77 (lines=8) @@
67
     *
68
     * @return array
69
     */
70
    public function add(array $data)
71
    {
72
        $data = $this->resolverFactory->createAppResolver()->resolve($data);
73
74
        return $this->api->request('POST', '/apps', [
75
            'Authorization' => 'Basic '.$this->api->getConfig()->getUserAuthKey(),
76
        ], json_encode($data));
77
    }
78
79
    /**
80
     * Update application with provided data.
@@ 89-96 (lines=8) @@
86
     *
87
     * @return array
88
     */
89
    public function update($id, array $data)
90
    {
91
        $data = $this->resolverFactory->createAppResolver()->resolve($data);
92
93
        return $this->api->request('PUT', '/apps/'.$id, [
94
            'Authorization' => 'Basic '.$this->api->getConfig()->getUserAuthKey(),
95
        ], json_encode($data));
96
    }
97
}
98

src/Notifications.php 1 location

@@ 83-90 (lines=8) @@
80
     *
81
     * @return array
82
     */
83
    public function add(array $data)
84
    {
85
        $data = $this->resolverFactory->createNotificationResolver()->resolve($data);
86
87
        return $this->api->request('POST', '/notifications', [
88
            'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(),
89
        ], json_encode($data));
90
    }
91
92
    /**
93
     * Open notification.