Code Duplication    Length = 18-20 lines in 2 locations

app/Containers/Payment/Actions/DeletePaymentAccountAction.php 1 location

@@ 14-31 (lines=18) @@
11
 *
12
 * @author  Johannes Schobel <[email protected]>
13
 */
14
class DeletePaymentAccountAction extends Action
15
{
16
17
    /**
18
     * @param \App\Ship\Transporters\DataTransporter $data
19
     */
20
    public function run(DataTransporter $data): void
21
    {
22
        $user = Apiato::call('[email protected]');
23
24
        $paymentAccount = Apiato::call('[email protected]', [$data->id]);
25
26
        // check if this account belongs to our user
27
        Apiato::call('[email protected]', [$user, $paymentAccount]);
28
29
        Apiato::call('[email protected]', [$paymentAccount]);
30
    }
31
}
32

app/Containers/Payment/Actions/FindPaymentAccountDetailsAction.php 1 location

@@ 15-34 (lines=20) @@
12
 *
13
 * @author  Johannes Schobel <[email protected]>
14
 */
15
class FindPaymentAccountDetailsAction extends Action
16
{
17
18
    /**
19
     * @param \App\Ship\Transporters\DataTransporter $data
20
     *
21
     * @return  \App\Containers\Payment\Models\PaymentAccount
22
     */
23
    public function run(DataTransporter $data): PaymentAccount
24
    {
25
        $user = Apiato::call('[email protected]');
26
27
        $paymentAccount = Apiato::call('[email protected]', [$data->id]);
28
29
        // check if this account belongs to our user
30
        Apiato::call('[email protected]', [$user, $paymentAccount]);
31
32
        return $paymentAccount;
33
    }
34
}
35