Skip to content

Commit 1f9070a

Browse files
committed
Add @throws tags
1 parent 2e71a04 commit 1f9070a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xExtension-ReadingTime/extension.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ final class ReadingTimeExtension extends Minz_Extension {
77
private string $metrics = 'words';
88

99
#[\Override]
10+
/** @throws FreshRSS_Context_Exception */
1011
public function init(): void {
1112
$this->registerTranslates();
1213
if (!FreshRSS_Context::hasUserConf()) {
@@ -55,6 +56,10 @@ public function getParams(array $vars): array {
5556
}
5657

5758
#[\Override]
59+
/**
60+
* @throws FreshRSS_Context_Exception
61+
* @throws Minz_ActionException
62+
*/
5863
public function handleConfigureAction(): void {
5964
$this->registerTranslates();
6065

@@ -65,13 +70,15 @@ public function handleConfigureAction(): void {
6570
}
6671
}
6772

73+
/** @throws Minz_ActionException */
6874
private function validateSpeed(int $speed): int {
6975
if ($speed <= 0) {
7076
throw new Minz_ActionException(_t('ext.reading_time.speed.invalid'), Minz_Request::actionName());
7177
}
7278
return $speed;
7379
}
7480

81+
/** @throws Minz_ActionException */
7582
private function validateMetrics(string $metrics): string {
7683
switch ($metrics) {
7784
case 'words':

0 commit comments

Comments
 (0)