PerformanceZoneAvailability::availableCount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
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