PerformanceZoneAvailability   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 16
c 2
b 0
f 0
dl 0
loc 42
ccs 14
cts 14
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A zone() 0 16 1
A availableCount() 0 4 1
1
<?php
2
3
namespace Clubdeuce\Tessitura\Resources;
4
5
use Clubdeuce\Tessitura\Base\Resource;
6
7
class PerformanceZoneAvailability extends Resource
8
{
9
    /**
10
     * @var int
11
     */
12
    protected int $_availableCount = 0;
13
14
    protected int $_performanceId = 0;
15
16
    /**
17
     * @var string[]
18
     */
19
    protected array $_zone;
20
21
    /**
22
     * @return int
23
     */
24 1
    public function availableCount(): int
25
    {
26
27 1
        return intval($this->_availableCount);
28
    }
29
30
    /**
31
     * @return object
32
     */
33 1
    public function zone(): object
34
    {
35
36 1
        $zone = new \stdClass();
37
38 1
        $zone->id               = intval($this->_zone['Id']);
39 1
        $zone->description      = $this->_zone['Description'];
40 1
        $zone->shortDescription = $this->_zone['ShortDescription'];
41 1
        $zone->rank             = $this->_zone['Rank'];
42 1
        $zone->zoneMapId        = $this->_zone['ZoneMapId'];
43 1
        $zone->zoneTime         = $this->_zone['ZoneTime'];
44 1
        $zone->abbreviation     = $this->_zone['Abbreviation'];
45 1
        $zone->zoneLegend       = $this->_zone['ZoneLegend'];
46 1
        $zone->zoneGroup        = $this->_zone['ZoneGroup'];
47
48 1
        return $zone;
49
    }
50
}
51