Skip to content
Snippets Groups Projects
Unverified Commit 61661036 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #17522 from nextcloud/fix/noid/reflection-toString-deprecated

Fix ReflectionType::__toString() is deprecated
parents 9d6a58e6 0ecc70c4
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment