BookingRequest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A allowed() 0 14 1
1
<?php
2
3
namespace Resova\Models;
4
5
use Resova\Model;
6
7
/**
8
 * Class BookingRequest
9
 *
10
 * @codeCoverageIgnore
11
 * @package Resova\Models
12
 */
13
class BookingRequest extends Model
14
{
15
    /**
16
     * List of allowed fields
17
     *
18
     * @return array
19
     */
20
    public function allowed(): array
21
    {
22
        return [
23
            'instance_id'  => 'int', // The instance id for the date, item and time.
24
            // TODO: implement validation like "array of objects"
25
            'quantities'   => 'array[Quantity]', // The quantities of item pricing categories for this basket booking. Pass an array of objects.
26
            'booking_time' => 'string', // The custom start time of the booking, can result in the creation of a time adjustment or an error if that time is unvavailable .
27
            'booking_end'  => 'string', // The custom end time of the booking, can result in the creation of a time adjustment or an error if that time is unvavailable.
28
            'fee_exempt'   => 'string', // True if this basket booking is fee exempt.
29
            'tax_exempt'   => 'string', // True if this basket booking is tax exempt.
30
            // TODO: implement validation like "array of objects"
31
            'extras'       => 'array[Extra]', // The item extras for this basket booking. Pass an array of objects.
32
            // TODO: implement validation like "array of objects"
33
            'questions'    => 'array[Question]', // The item booking questions for this basket booking. Pass an array of objects.
34
        ];
35
    }
36
}
37