summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-10-12 22:55:07 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-10-14 09:50:12 +0200
commit0ecc70c4970dfe6ef1d164c427379738680a5f29 (patch)
treedc4180fa6131ff06b631172405652a74f7b7f2e6 /lib/private
parentace74ef866453d2ae87e3d15be181dc00343dbbf (diff)
downloadnextcloud-server-0ecc70c4970dfe6ef1d164c427379738680a5f29.tar.gz
nextcloud-server-0ecc70c4970dfe6ef1d164c427379738680a5f29.zip
Assume that getType is available
From PHP7 getType is always available. No need to check it nowdays. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AppFramework/Utility/ControllerMethodReflector.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
index 7eee2ac8e52..fd42606cf54 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 instanceof \ReflectionNamedType) {
- $this->types[$param->getName()] = $type->getName();
- }
+ // 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;