Passed
Push — master ( 60b6ca...163cac )
by Kylian
06:19
created

BeatMapStats::getDownvotesNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

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 3
rs 10
1
<?php
2
3
namespace KriKrixs\object\beatmap;
4
5
class BeatMapStats
6
{
7
    private object $stats;
8
9
    /**
10
     * Create a new BeatMapStats object
11
     * @param object $stats
12
     */
13
    public function __construct(object $stats)
14
    {
15
        $this->stats = $stats;
16
    }
17
18
    /**
19
     * Get map plays number
20
     * @return int
21
     */
22
    public function getPlaysNumber(): int
23
    {
24
        return $this->stats->plays;
25
    }
26
27
    /**
28
     * Get map download number
29
     * @return int
30
     */
31
    public function getDownloadsNumber(): int
32
    {
33
        return $this->stats->downloads;
34
    }
35
36
    /**
37
     * Get map upvotes number
38
     * @return int
39
     */
40
    public function getUpvotesNumber(): int
41
    {
42
        return $this->stats->upvotes;
43
    }
44
45
    /**
46
     * Get map downvotes number
47
     * @return int
48
     */
49
    public function getDownvotesNumber(): int
50
    {
51
        return $this->stats->downvotes;
52
    }
53
54
    /**
55
     * Get votes ratio
56
     * @return int
57
     */
58
    public function getVotesRatio(): float
59
    {
60
        return $this->stats->score;
61
    }
62
}