[web-php] master: Fix: Add type and return type declaration (#587)
| From: | Andreas Möller via GitHub | Date: | Tue, 28 Jun 2022 21:19:57 +0000 |
| Subject: | [web-php] master: Fix: Add type and return type declaration (#587) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-30189@lists.php.net to get a copy of this message | ||
Author: Andreas Möller (localheinz)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2022-06-28T22:13:58+01:00
Commit: https://github.com/php/web-php/commit/c6fecd852957b1876d13364d6840e5aad52d3d5a
Raw diff: https://github.com/php/web-php/commit/c6fecd852957b1876d13364d6840e5aad52d3d5a.diff
Fix: Add type and return type declaration (#587)
Changed paths:
M include/branches.inc
Diff:
diff --git a/include/branches.inc b/include/branches.inc
index b4024509c..46a54f1dd 100644
--- a/include/branches.inc
+++ b/include/branches.inc
@@ -86,11 +86,13 @@ function format_interval($from, $to) {
return $eolPeriod;
}
-function version_number_to_branch($version) {
+function version_number_to_branch(string $version): ?string {
$parts = explode('.', $version);
if (count($parts) > 1) {
return "$parts[0].$parts[1]";
}
+
+ return null;
}
function get_all_branches() {