Completed
Push — master ( 0b05ef...ba9f5c )
by Mr
02:22
created

Booking   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 19
c 1
b 0
f 1
dl 0
loc 27
ccs 0
cts 20
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A allowed() 0 20 1
1
<?php
2
3
namespace Resova\Objects;
4
5
/**
6
 * The basket booking object
7
 * The booking object allows you to manage bookings for a basket.
8
 *
9
 * @package Resova\Objects
10
 */
11
class Booking
12
{
13
    /**
14
     * List of allowed fields
15
     *
16
     * @return array
17
     */
18
    public function allowed(): array
19
    {
20
        return [
21
            'id'             => 'int',    // The unique id for the booking object.
22
            'item'           => 'object', // The item associated with the booking, an instance of the item object.
23
            'time'           => 'object', // The time associated with the booking, an instance of the time object
24
            'booking_date'   => 'string', // The date of the basket booking.
25
            'booking_time'   => 'string', // The time of the basket booking.
26
            'booking_end'    => 'string', // The end time of the basket booking.
27
            'duration'       => 'int',    // The duration of the basket booking.
28
            'total_quantity' => 'int',    // The total quantity of spaces for the basket booking.
29
            'quantities'     => 'array:Quantity', // The quantities of item pricing categories for this basket booking.
30
            'extras'         => 'array:Extra', // The item extras for this basket booking.
31
            'price'          => 'float',  // The basket booking subtotal.
32
            'discount'       => 'float',  // The total discount value of the basket.
33
            'fee'            => 'float',  // The fee value of the basket.
34
            'tax'            => 'float',  // The tax value of the basket.
35
            'total'          => 'float',  // The total for the basket.
36
            'questions'      => 'array:Question', // The item booking questions for this basket booking.
37
            'participants'   => 'array',  // The participants for this basket booking.
38
        ];
39
    }
40
}
41