Code Duplication    Length = 13-13 lines in 2 locations

src/Paystack.php 2 locations

@@ 297-309 (lines=13) @@
294
    /**
295
     * Create a customer
296
     */
297
    public function createCustomer()
298
    {
299
        $data = [
300
            "email" => request()->email,
301
            "first_name" => request()->fname,
302
            "last_name" => request()->lname,
303
            "phone" => request()->phone,
304
            "metadata" => request()->additional_info /* key => value pairs array */
305
306
        ];
307
308
        return $this->paystack->customers()->create($data);
309
    }
310
311
    /**
312
     * Fetch a customer based on id or code
@@ 326-338 (lines=13) @@
323
     * @param $customerId
324
     * @return array
325
     */
326
    public function updateCustomer($customerId)
327
    {
328
        $data = [
329
            "email" => request()->email,
330
            "first_name" => request()->fname,
331
            "last_name" => request()->lname,
332
            "phone" => request()->phone,
333
            "metadata" => request()->additional_info /* key => value pairs array */
334
335
        ];
336
337
        return $this->paystack->customers()->update($customerId, $data);
338
    }
339
340
    /**
341
     * Export transactions in .CSV