Code Duplication    Length = 41-41 lines in 2 locations

src/Requests/External/CountriesRequest.php 1 location

@@ 7-47 (lines=41) @@
4
5
use Payment247\SDK\Requests\Request;
6
7
class CountriesRequest extends Request implements IHasType
8
{
9
    use TypeTrait;
10
11
    protected $fields = [
12
        'ps',
13
        'type',
14
    ];
15
16
    public function __construct($paymentSystem = null, $type = null)
17
    {
18
        parent::__construct();
19
20
        $this->setPaymentSystem($paymentSystem);
21
        $this->setType($type);
22
    }
23
24
    /**
25
     * @param string $paymentSystem
26
     */
27
    public function setPaymentSystem($paymentSystem)
28
    {
29
        $this->raw['ps'] = $paymentSystem;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getRequestType()
36
    {
37
        return 'external/ps-countries';
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getPaymentSystem()
44
    {
45
        return $this->raw['ps'];
46
    }
47
}
48

src/Requests/External/LimitsRequest.php 1 location

@@ 7-47 (lines=41) @@
4
5
use Payment247\SDK\Requests\Request;
6
7
class LimitsRequest extends Request implements IHasType
8
{
9
    use TypeTrait;
10
11
    protected $fields = [
12
        'ps',
13
        'type',
14
    ];
15
16
    public function __construct($paymentSystem = null, $type = null)
17
    {
18
        parent::__construct();
19
20
        $this->setPaymentSystem($paymentSystem);
21
        $this->setType($type);
22
    }
23
24
    /**
25
     * @param string $paymentSystem
26
     */
27
    public function setPaymentSystem($paymentSystem)
28
    {
29
        $this->raw['ps'] = $paymentSystem;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getRequestType()
36
    {
37
        return 'external/ps-limits';
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getPaymentSystem()
44
    {
45
        return $this->raw['ps'];
46
    }
47
}
48