Code Duplication    Length = 28-29 lines in 2 locations

src/Amadeus/Client/Struct/Pay/AmountRange.php 1 location

@@ 33-61 (lines=29) @@
30
 * @package Amadeus\Client\Struct\Pay
31
 * @author Konstantin Bogomolov <[email protected]>
32
 */
33
class AmountRange
34
{
35
36
    /**
37
     * @var integer
38
     */
39
    public $Min;
40
41
    /**
42
     * @var integer
43
     */
44
    public $Max;
45
46
    /**
47
     * AmountRange constructor.
48
     *
49
     * @param PayListVirtualCardsOptions $params
50
     */
51
    public function __construct(PayListVirtualCardsOptions $params)
52
    {
53
        if ($params->AmountRange->min !== null) {
54
            $this->Min = $params->AmountRange->min;
55
        }
56
57
        if ($params->AmountRange->max !== null) {
58
            $this->Max = $params->AmountRange->max;
59
        }
60
    }
61
}
62

src/Amadeus/Client/Struct/Pay/Reservation.php 1 location

@@ 34-61 (lines=28) @@
31
 * @package Amadeus\Client\Struct\Pay
32
 * @author Konstantin Bogomolov <[email protected]>
33
 */
34
class Reservation
35
{
36
    /**
37
     * @var string
38
     */
39
    public $ID;
40
41
    /**
42
     * @var string
43
     */
44
    public $ExternalID;
45
46
    /**
47
     * Reservation constructor.
48
     *
49
     * @param PayListVirtualCardsOptions $params
50
     */
51
    public function __construct(PayListVirtualCardsOptions $params)
52
    {
53
        if ($params->Reservation->id !== null) {
54
            $this->ID = $params->Reservation->id;
55
        }
56
57
        if ($params->Reservation->externalId !== null) {
58
            $this->ExternalID = $params->Reservation->externalId;
59
        }
60
    }
61
}
62