File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,12 +27,14 @@ function branches_to_show() {
2727 return $ branches ;
2828}
2929
30- function min_date () {
30+ function min_date (): DateTime
31+ {
3132 $ now = new DateTime ('January 1 ' );
3233 return $ now ->sub (new DateInterval ('P3Y ' ));
3334}
3435
35- function max_date () {
36+ function max_date (): DateTime
37+ {
3638 $ now = new DateTime ('January 1 ' );
3739 return $ now ->add (new DateInterval ('P5Y ' ));
3840}
Original file line number Diff line number Diff line change @@ -286,7 +286,8 @@ function get_final_release($branch) {
286286 return null ;
287287}
288288
289- function get_branch_bug_eol_date ($ branch ) {
289+ function get_branch_bug_eol_date ($ branch ): ?DateTime
290+ {
290291 if (isset ($ GLOBALS ['BRANCHES ' ][$ branch ]['stable ' ])) {
291292 return new DateTime ($ GLOBALS ['BRANCHES ' ][$ branch ]['stable ' ]);
292293 }
@@ -296,7 +297,8 @@ function get_branch_bug_eol_date($branch) {
296297 return $ date ? $ date ->add (new DateInterval ('P2Y ' )) : null ;
297298}
298299
299- function get_branch_security_eol_date ($ branch ) {
300+ function get_branch_security_eol_date ($ branch ): ?DateTime
301+ {
300302 if (isset ($ GLOBALS ['BRANCHES ' ][$ branch ]['security ' ])) {
301303 return new DateTime ($ GLOBALS ['BRANCHES ' ][$ branch ]['security ' ]);
302304 }
@@ -313,7 +315,8 @@ function get_branch_security_eol_date($branch) {
313315 return $ date ? $ date ->add (new DateInterval ('P3Y ' )) : null ;
314316}
315317
316- function get_branch_release_date ($ branch ) {
318+ function get_branch_release_date ($ branch ): ?DateTime
319+ {
317320 $ initial = get_initial_release ($ branch );
318321
319322 return $ initial ? new DateTime ($ initial ['date ' ]) : null ;
You can’t perform that action at this time.
0 commit comments