Hotel::getAttributeMap()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace DJStarCOM\BookingComSDK\Models;
4
5
use stdClass;
6
7
/**
8
 * Class Hotel
9
 * @package DJStarCOM\BookingComSDK\Models
10
 */
11
class Hotel extends Model
12
{
13
    /**
14
     * Hotel specific information.
15
     *
16
     * @var stdClass
17
     */
18
    protected $hotel_data;
19
20
    /**
21
     * This block has room data for this hotel.
22
     *
23
     * @var array
24
     */
25
    protected $room_data;
26
27
    /**
28
     * Unique ID to represent this hotel.
29
     *
30
     * @var integer
31
     */
32
    protected $hotel_id;
33
34
    /**
35
     * Collection primary key
36
     * @return int
37
     */
38
    public function getPrimaryKey(): int
39
    {
40
        return $this->hotel_id;
41
    }
42
43
    /**
44
     * Hotel specific information.
45
     * @return stdClass
46
     */
47
    public function getHotelData(): stdClass
48
    {
49
        return $this->hotel_data;
50
    }
51
52
    /**
53
     * This block has room data for this hotel.
54
     * @return array
55
     */
56
    public function getRoomData(): array
57
    {
58
        return $this->room_data;
59
    }
60
61
    /**
62
     * Unique ID to represent this hotel.
63
     * @return int
64
     */
65
    public function getHotelId(): int
66
    {
67
        return $this->hotel_id;
68
    }
69
70
    /**
71
     * @return array
72
     */
73
    protected function getAttributeMap(): array
74
    {
75
        return [
76
            'hotel_data' => 'object',
77
            'room_data'  => 'array',
78
            'hotel_id'   => 'integer',
79
        ];
80
    }
81
}
82