Controller::createWepayAccount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 9
Ratio 100 %

Importance

Changes 0
Metric Value
dl 9
loc 9
c 0
b 0
f 0
rs 9.9666
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Containers\Wepay\UI\API\Controllers;
4
5
use Apiato\Core\Foundation\Facades\Apiato;
6
use App\Containers\Wepay\UI\API\Requests\CreateWepayAccountRequest;
7
use App\Ship\Parents\Controllers\ApiController;
8
use App\Ship\Transporters\DataTransporter;
9
10
/**
11
 * Class Controller.
12
 *
13
 * @author Rockers Technologies <[email protected]>
14
 */
15
class Controller extends ApiController
16
{
17
18
    /**
19
     * @param \App\Containers\Wepay\UI\API\Requests\CreateWepayAccountRequest $request
20
     *
21
     * @return  \Illuminate\Http\JsonResponse
22
     */
23 View Code Duplication
    public function createWepayAccount(CreateWepayAccountRequest $request)
0 ignored issues
show
Duplication introduced by Jaimin Suthar
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
    {
25
        $wepayAccount = Apiato::call('[email protected]', [new DataTransporter($request)]);
26
27
        return $this->accepted([
28
            'message'        => 'Wepay account created successfully.',
29
            'wepayAccountId' => $wepayAccount->id,
30
        ]);
31
    }
32
33
}
34