Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 30 |
|
0.00% |
0 / 30 |
CRAP | |
0.00% |
0 / 1 |
| ListenMetricsEntry | |
0.00% |
0 / 30 |
|
0.00% |
0 / 30 |
930 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getTimestamp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTimestamp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getSegmentIndex | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setSegmentIndex | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getSegmentHash | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setSegmentHash | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getRemoteWikiHash | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRemoteWikiHash | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getConsumerUrl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setConsumerUrl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPageTitle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPageTitle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPageId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPageId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPageRevisionId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPageRevisionId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getLanguage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLanguage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getVoice | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setVoice | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getMicrosecondsSpent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setMicrosecondsSpent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getUtteranceSynthesized | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setUtteranceSynthesized | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getMillisecondsSpeechInUtterance | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setMillisecondsSpeechInUtterance | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getCharactersInSegment | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setCharactersInSegment | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Wikispeech\Api; |
| 4 | |
| 5 | /** |
| 6 | * @file |
| 7 | * @ingroup API |
| 8 | * @ingroup Extensions |
| 9 | * @license GPL-2.0-or-later |
| 10 | */ |
| 11 | |
| 12 | use MWTimestamp; |
| 13 | |
| 14 | /** |
| 15 | * A journal entry of an utterance request. |
| 16 | * |
| 17 | * @since 0.1.10 |
| 18 | */ |
| 19 | class ListenMetricsEntry { |
| 20 | |
| 21 | /** |
| 22 | * @var int|null |
| 23 | * @todo This is useless if we're only use the file journal. |
| 24 | */ |
| 25 | private $id = null; |
| 26 | |
| 27 | /** @var MWTimestamp|null */ |
| 28 | private $timestamp = null; |
| 29 | |
| 30 | /** @var int|null */ |
| 31 | private $segmentIndex = null; |
| 32 | |
| 33 | /** @var string|null */ |
| 34 | private $segmentHash = null; |
| 35 | |
| 36 | /** @var string|null */ |
| 37 | private $remoteWikiHash = null; |
| 38 | |
| 39 | /** @var string|null */ |
| 40 | private $consumerUrl = null; |
| 41 | |
| 42 | /** @var string|null */ |
| 43 | private $pageTitle = null; |
| 44 | |
| 45 | /** @var int|null */ |
| 46 | private $pageId = null; |
| 47 | |
| 48 | /** @var int|null */ |
| 49 | private $pageRevisionId = null; |
| 50 | |
| 51 | /** @var string|null */ |
| 52 | private $language = null; |
| 53 | |
| 54 | /** @var string|null */ |
| 55 | private $voice = null; |
| 56 | |
| 57 | /** @var int|null */ |
| 58 | private $microsecondsSpent = null; |
| 59 | |
| 60 | /** @var bool|null */ |
| 61 | private $utteranceSynthesized = null; |
| 62 | |
| 63 | /** @var int|null */ |
| 64 | private $millisecondsSpeechInUtterance = null; |
| 65 | |
| 66 | /** @var int|null */ |
| 67 | private $charactersInSegment = null; |
| 68 | |
| 69 | /** |
| 70 | * @since 0.1.10 |
| 71 | * @return int|null |
| 72 | */ |
| 73 | public function getId(): ?int { |
| 74 | return $this->id; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * @since 0.1.10 |
| 79 | * @param int|null $id |
| 80 | */ |
| 81 | public function setId( ?int $id ): void { |
| 82 | $this->id = $id; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * @since 0.1.10 |
| 87 | * @return MWTimestamp|null |
| 88 | */ |
| 89 | public function getTimestamp(): ?MWTimestamp { |
| 90 | return $this->timestamp; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * @since 0.1.10 |
| 95 | * @param MWTimestamp|null $timestamp |
| 96 | */ |
| 97 | public function setTimestamp( ?MWTimestamp $timestamp ): void { |
| 98 | $this->timestamp = $timestamp; |
| 99 | } |
| 100 | |
| 101 | /** |
| 102 | * @since 0.1.10 |
| 103 | * @return int|null |
| 104 | */ |
| 105 | public function getSegmentIndex(): ?int { |
| 106 | return $this->segmentIndex; |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * @since 0.1.10 |
| 111 | * @param int|null $segmentIndex |
| 112 | */ |
| 113 | public function setSegmentIndex( ?int $segmentIndex ): void { |
| 114 | $this->segmentIndex = $segmentIndex; |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * @since 0.1.10 |
| 119 | * @return string|null |
| 120 | */ |
| 121 | public function getSegmentHash(): ?string { |
| 122 | return $this->segmentHash; |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * @since 0.1.10 |
| 127 | * @param string|null $segmentHash |
| 128 | */ |
| 129 | public function setSegmentHash( ?string $segmentHash ): void { |
| 130 | $this->segmentHash = $segmentHash; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * @since 0.1.10 |
| 135 | * @return string|null |
| 136 | */ |
| 137 | public function getRemoteWikiHash(): ?string { |
| 138 | return $this->remoteWikiHash; |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * @since 0.1.10 |
| 143 | * @param string|null $remoteWikiHash |
| 144 | */ |
| 145 | public function setRemoteWikiHash( ?string $remoteWikiHash ): void { |
| 146 | $this->remoteWikiHash = $remoteWikiHash; |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * @since 0.1.10 |
| 151 | * @return string|null |
| 152 | */ |
| 153 | public function getConsumerUrl(): ?string { |
| 154 | return $this->consumerUrl; |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * @since 0.1.10 |
| 159 | * @param string|null $consumerUrl |
| 160 | */ |
| 161 | public function setConsumerUrl( ?string $consumerUrl ): void { |
| 162 | $this->consumerUrl = $consumerUrl; |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * @since 0.1.10 |
| 167 | * @return string|null |
| 168 | */ |
| 169 | public function getPageTitle(): ?string { |
| 170 | return $this->pageTitle; |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * @since 0.1.10 |
| 175 | * @param string|null $pageTitle |
| 176 | */ |
| 177 | public function setPageTitle( ?string $pageTitle ): void { |
| 178 | $this->pageTitle = $pageTitle; |
| 179 | } |
| 180 | |
| 181 | /** |
| 182 | * @since 0.1.10 |
| 183 | * @return int|null |
| 184 | */ |
| 185 | public function getPageId(): ?int { |
| 186 | return $this->pageId; |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * @since 0.1.10 |
| 191 | * @param int|null $pageId |
| 192 | */ |
| 193 | public function setPageId( ?int $pageId ): void { |
| 194 | $this->pageId = $pageId; |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * @since 0.1.10 |
| 199 | * @return int|null |
| 200 | */ |
| 201 | public function getPageRevisionId(): ?int { |
| 202 | return $this->pageRevisionId; |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * @since 0.1.10 |
| 207 | * @param int|null $pageRevisionId |
| 208 | */ |
| 209 | public function setPageRevisionId( ?int $pageRevisionId ): void { |
| 210 | $this->pageRevisionId = $pageRevisionId; |
| 211 | } |
| 212 | |
| 213 | /** |
| 214 | * @since 0.1.10 |
| 215 | * @return string|null |
| 216 | */ |
| 217 | public function getLanguage(): ?string { |
| 218 | return $this->language; |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * @since 0.1.10 |
| 223 | * @param string|null $language |
| 224 | */ |
| 225 | public function setLanguage( ?string $language ): void { |
| 226 | $this->language = $language; |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * @since 0.1.10 |
| 231 | * @return string|null |
| 232 | */ |
| 233 | public function getVoice(): ?string { |
| 234 | return $this->voice; |
| 235 | } |
| 236 | |
| 237 | /** |
| 238 | * @since 0.1.10 |
| 239 | * @param string|null $voice |
| 240 | */ |
| 241 | public function setVoice( ?string $voice ): void { |
| 242 | $this->voice = $voice; |
| 243 | } |
| 244 | |
| 245 | /** |
| 246 | * @since 0.1.10 |
| 247 | * @return int|null |
| 248 | */ |
| 249 | public function getMicrosecondsSpent(): ?int { |
| 250 | return $this->microsecondsSpent; |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * @since 0.1.10 |
| 255 | * @param int|null $microsecondsSpent |
| 256 | */ |
| 257 | public function setMicrosecondsSpent( ?int $microsecondsSpent ): void { |
| 258 | $this->microsecondsSpent = $microsecondsSpent; |
| 259 | } |
| 260 | |
| 261 | /** |
| 262 | * @since 0.1.10 |
| 263 | * @return bool|null |
| 264 | */ |
| 265 | public function getUtteranceSynthesized(): ?bool { |
| 266 | return $this->utteranceSynthesized; |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * @since 0.1.10 |
| 271 | * @param bool|null $utteranceSynthesized |
| 272 | */ |
| 273 | public function setUtteranceSynthesized( ?bool $utteranceSynthesized ): void { |
| 274 | $this->utteranceSynthesized = $utteranceSynthesized; |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * @since 0.1.10 |
| 279 | * @return int|null |
| 280 | */ |
| 281 | public function getMillisecondsSpeechInUtterance(): ?int { |
| 282 | return $this->millisecondsSpeechInUtterance; |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * @since 0.1.10 |
| 287 | * @param int|null $millisecondsSpeechInUtterance |
| 288 | */ |
| 289 | public function setMillisecondsSpeechInUtterance( ?int $millisecondsSpeechInUtterance ): void { |
| 290 | $this->millisecondsSpeechInUtterance = $millisecondsSpeechInUtterance; |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * @since 0.1.10 |
| 295 | * @return int|null |
| 296 | */ |
| 297 | public function getCharactersInSegment(): ?int { |
| 298 | return $this->charactersInSegment; |
| 299 | } |
| 300 | |
| 301 | /** |
| 302 | * @since 0.1.10 |
| 303 | * @param int|null $charactersInSegment |
| 304 | */ |
| 305 | public function setCharactersInSegment( ?int $charactersInSegment ): void { |
| 306 | $this->charactersInSegment = $charactersInSegment; |
| 307 | } |
| 308 | |
| 309 | } |