Passed
Push — master ( f4145f...eee8ec )
by Artem
03:30
created

TLAGetFareRules   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A loadFareBasisInfo() 0 3 1
1
<?php
2
3
namespace Amadeus\Client\Struct\Fare;
4
5
use Amadeus\Client\RequestOptions\FareTLAGetFareRulesOptions;
6
use Amadeus\Client\Struct\BaseWsMessage;
7
use Amadeus\Client\Struct\Fare\TLAGetFareRules\FareBasisInfo;
8
9
class TLAGetFareRules extends BaseWsMessage
10
{
11
    public $messageFunctionInfo;
12
13
    public $fareBasisInfo;
14
15
    /**
16
     * @param FareTLAGetFareRulesOptions $options
17
     */
18
    public function __construct(FareTLAGetFareRulesOptions $options)
19
    {
20
        $this->messageFunctionInfo = new MessageFunctionInfo(MessageFunctionDetails::FARE_DISPLAY_RULES);
21
        $this->loadFareBasisInfo($options);
22
    }
23
24
    private function loadFareBasisInfo(FareTLAGetFareRulesOptions $options)
25
    {
26
        $this->fareBasisInfo = new FareBasisInfo($options->tariffClassId, $options->airlineCode);
27
    }
28
}
29