File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff 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 ' :
You can’t perform that action at this time.
0 commit comments