Passed
Push — master ( 6c8080...f4145f )
by Artem
03:33
created

BookPriceProduct   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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
1
<?php
2
3
namespace Amadeus\Client\Struct\Service;
4
5
use Amadeus\Client\RequestOptions\ServiceBookPriceProductOptions;
6
use Amadeus\Client\Struct\BaseWsMessage;
7
use Amadeus\Client\Struct\Service\BookPriceProduct\Recommendation;
8
9
class BookPriceProduct extends BaseWsMessage
10
{
11
    /**
12
     * @var Recommendation[]
13
     */
14
    public $Recommendation;
15
    
16
    public $Version;
17
18
    /**
19
     * @param ServiceBookPriceProductOptions $options
20
     */
21
    public function __construct($options)
22
    {
23
        $this->Version = $options->version;
24
        
25
        foreach ($options->recommendations as $recommendation) {
26
            $this->Recommendation[] = new Recommendation($recommendation);
27
        }
28
    }
29
}
30