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

BookPriceProduct::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 2
nc 2
nop 1
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