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

BeatMapMetadata   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 getBpm() 0 3 1
A getSongSubName() 0 3 1
A __construct() 0 3 1
A getSongAuthorName() 0 3 1
A getDuration() 0 3 1
A getSongName() 0 3 1
A getLeverAuthorName() 0 3 1
1
<?php
2
3
namespace KriKrixs\object\beatmap;
4
5
class BeatMapMetadata
6
{
7
    private object $metadata;
8
9
    /**
10
     * Create a new BeatMapMetadata object
11
     * @param object $metadata
12
     */
13
    public function __construct(object $metadata)
14
    {
15
        $this->metadata = $metadata;
16
    }
17
18
    /**
19
     * Get metadata bpm
20
     * @return int
21
     */
22
    public function getBpm(): int
23
    {
24
        return $this->metadata->bpm;
25
    }
26
27
    /**
28
     * Get metadata duration (in seconds)
29
     * @return int
30
     */
31
    public function getDuration(): int
32
    {
33
        return $this->metadata->duration;
34
    }
35
36
    /**
37
     * Get metadata song name
38
     * @return string
39
     */
40
    public function getSongName(): string
41
    {
42
        return $this->metadata->songName;
43
    }
44
45
    /**
46
     * Get metadata song sub name
47
     * @return string
48
     */
49
    public function getSongSubName(): string
50
    {
51
        return $this->metadata->songSubName;
52
    }
53
54
    /**
55
     * Get metadata song author name
56
     * @return string
57
     */
58
    public function getSongAuthorName(): string
59
    {
60
        return $this->metadata->songAuthorName;
61
    }
62
63
    /**
64
     * Get metadata level author name
65
     * @return string
66
     */
67
    public function getLeverAuthorName(): string
68
    {
69
        return $this->metadata->levelAuthorName;
70
    }
71
}