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

UserStatsDifficulties   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 65
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getExpertNumber() 0 3 1
A getEasyNumber() 0 3 1
A getHardNumber() 0 3 1
A getNormalNumber() 0 3 1
A getTotal() 0 3 1
A getExpertPlusNumber() 0 3 1
1
<?php
2
3
namespace KriKrixs\object\user;
4
5
class UserStatsDifficulties
6
{
7
    private object $diff;
8
9
    /**
10
     * Create a new UserStatsDifficulties object
11
     * @param object $diff
12
     */
13
    public function __construct(object $diff)
14
    {
15
        $this->diff = $diff;
16
    }
17
18
    /**
19
     * Get user stats difficulties total
20
     * @return int
21
     */
22
    public function getTotal(): int
23
    {
24
        return $this->diff->total;
25
    }
26
27
    /**
28
     * Get user stats difficulties easy number
29
     * @return int
30
     */
31
    public function getEasyNumber(): int
32
    {
33
        return $this->diff->easy;
34
    }
35
36
    /**
37
     * Get user stats difficulties normal number
38
     * @return int
39
     */
40
    public function getNormalNumber(): int
41
    {
42
        return $this->diff->normal;
43
    }
44
45
    /**
46
     * Get user stats difficulties hard number
47
     * @return int
48
     */
49
    public function getHardNumber(): int
50
    {
51
        return $this->diff->hard;
52
    }
53
54
    /**
55
     * Get user stats difficulties expert number
56
     * @return int
57
     */
58
    public function getExpertNumber(): int
59
    {
60
        return $this->diff->expert;
61
    }
62
63
    /**
64
     * Get user stats difficulties expert+ number
65
     * @return int
66
     */
67
    public function getExpertPlusNumber(): int
68
    {
69
        return $this->diff->expertPlus;
70
    }
71
}