Hotel   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 71
ccs 0
cts 24
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getPrimaryKey() 0 4 1
A getHotelData() 0 4 1
A getRoomData() 0 4 1
A getHotelId() 0 4 1
A getAttributeMap() 0 8 1
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