Event   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 39
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 18 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace InShore\Bookwhen\Domain;
6
7
use InShore\Bookwhen\Domain\Location;
8
9
final class Event
10
{
11
    /**
12
     *
13
     */
14
    public int $attendeeAvailable;
15
16
    /**
17
     *
18
     */
19
    public bool $finished;
20
21
    /**
22
     *
23
     */
24
    public bool $soldOut;
25
26
    /**
27
     *
28
     *
29
     */
30 3
    public function __construct(
31
        public readonly bool $allDay,
32
        public readonly array $attachments,
33
        public readonly int $attendeeCount,
34
        public readonly int $attendeeLimit,
35
        public readonly string $details,
36
        public readonly string $endAt,
37
        public readonly string $id,
38
        public readonly Location $location,
39
        public readonly int $maxTicketsPerBooking,
40
        public readonly string $startAt,
41
        public readonly array $tickets,
42
        public readonly string $title,
43
        public readonly bool $waitingList
44
    ) {
45 3
        $this->attendeeAvailable = $this->attendeeLimit - $this->attendeeCount;
46 3
        $this->finished = false; // @todo
47 3
        $this->soldOut = ($this->attendeeCount === $this->attendeeLimit);
48
    }
49
}
50