aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2025-03-04 14:23:21 +0100
committerGitHub <noreply@github.com>2025-03-04 14:23:21 +0100
commit42d752f7679ebd8c34c8932aaa64d1f9a92be02d (patch)
tree781f696535e9300cc005aad7e10aa5eee78c57a9 /lib
parentbeb12e9be3a3c235ab1552cc3f66f442820f19d6 (diff)
parent6594d7d96d7695567bbc42d882c3bfebfbab97a3 (diff)
downloadnextcloud-server-42d752f7679ebd8c34c8932aaa64d1f9a92be02d.tar.gz
nextcloud-server-42d752f7679ebd8c34c8932aaa64d1f9a92be02d.zip
Merge pull request #51116 from nextcloud/enh/noid/nullable-range
feat(AppFramework): extend range check to optional parameters
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AppFramework/Utility/ControllerMethodReflector.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
index 2031327dfae..679e1788004 100644
--- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php
+++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
@@ -50,7 +50,7 @@ class ControllerMethodReflector implements IControllerMethodReflector {
// extract type parameter information
preg_match_all('/@param\h+(?P<type>\w+)\h+\$(?P<var>\w+)/', $docs, $matches);
$this->types = array_combine($matches['var'], $matches['type']);
- preg_match_all('/@psalm-param\h+(?P<type>\w+)<(?P<rangeMin>(-?\d+|min)),\h*(?P<rangeMax>(-?\d+|max))>\h+\$(?P<var>\w+)/', $docs, $matches);
+ preg_match_all('/@psalm-param\h+(\?)?(?P<type>\w+)<(?P<rangeMin>(-?\d+|min)),\h*(?P<rangeMax>(-?\d+|max))>(\|null)?\h+\$(?P<var>\w+)/', $docs, $matches);
foreach ($matches['var'] as $index => $varName) {
if ($matches['type'][$index] !== 'int') {
// only int ranges are possible at the moment