Voice::setDuration()   A
last analyzed

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
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\File;
6
7
/**
8
 * This object represents a voice note.
9
 *
10
 * More on https://core.telegram.org/bots/api#voice
11
 */
12
class Voice
13
{
14
15
    /**
16
     * Identifier for this file, which can be used to download or reuse the file
17
     *
18
     * @var string
19
     */
20
    private $file_id;
21
22
    /**
23
     * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to
24
     * download or reuse the file.
25
     *
26
     * @var string
27
     */
28
    private $file_unique_id;
29
30
    /**
31
     * Duration of the audio in seconds as defined by sender
32
     *
33
     * @var int
34
     */
35
    private $duration;
36
37
    /**
38
     * Optional. MIME type of the file as defined by sender
39
     *
40
     * @var string|null
41
     */
42
    private $mime_type;
43
44
    /**
45
     * Optional. File size
46
     *
47
     * @var int|null
48
     */
49
    private $file_size;
50
51
    /**
52
     * @return string
53
     */
54
    public function getFileId(): string
55
    {
56
        return $this->file_id;
57
    }
58
59
    /**
60
     * @param string $file_id
61
     */
62
    public function setFileId(string $file_id): void
63
    {
64
        $this->file_id = $file_id;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getFileUniqueId(): string
71
    {
72
        return $this->file_unique_id;
73
    }
74
75
    /**
76
     * @param string $file_unique_id
77
     */
78
    public function setFileUniqueId(string $file_unique_id): void
79
    {
80
        $this->file_unique_id = $file_unique_id;
81
    }
82
83
    /**
84
     * @return int
85
     */
86
    public function getDuration(): int
87
    {
88
        return $this->duration;
89
    }
90
91
    /**
92
     * @param int $duration
93
     */
94
    public function setDuration(int $duration): void
95
    {
96
        $this->duration = $duration;
97
    }
98
99
    /**
100
     * @return string|null
101
     */
102
    public function getMimeType(): ?string
103
    {
104
        return $this->mime_type;
105
    }
106
107
    /**
108
     * @param string|null $mime_type
109
     */
110
    public function setMimeType(?string $mime_type): void
111
    {
112
        $this->mime_type = $mime_type;
113
    }
114
115
    /**
116
     * @return int|null
117
     */
118
    public function getFileSize(): ?int
119
    {
120
        return $this->file_size;
121
    }
122
123
    /**
124
     * @param int|null $file_size
125
     */
126
    public function setFileSize(?int $file_size): void
127
    {
128
        $this->file_size = $file_size;
129
    }
130
131
}