diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
index ef4a1959d66f6da8247746e2e282c2ab53a929db..fd42606cf54d99fdaf10397671946e0d92ce9427 100644
--- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php
+++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
@@ -72,13 +72,10 @@ class ControllerMethodReflector implements IControllerMethodReflector {
 		}
 
 		foreach ($reflection->getParameters() as $param) {
-			// extract type information from PHP 7 scalar types and prefer them
-			// over phpdoc annotations
-			if (method_exists($param, 'getType')) {
-				$type = $param->getType();
-				if ($type !== null) {
-					$this->types[$param->getName()] = (string) $type;
-				}
+			// extract type information from PHP 7 scalar types and prefer them over phpdoc annotations
+			$type = $param->getType();
+			if ($type instanceof \ReflectionNamedType) {
+				$this->types[$param->getName()] = $type->getName();
 			}
 
 			$default = null;