From 2ae893120ecb69306c1bf2d072424f0e9a4a0f9d Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Thu, 2 Jun 2016 17:56:27 -0400 Subject: [PATCH] Ignore trailing slashes in user-supplied classes --- src/CodeInspector/StatementsChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CodeInspector/StatementsChecker.php b/src/CodeInspector/StatementsChecker.php index f7f9c84aa..ecf7e34ea 100644 --- a/src/CodeInspector/StatementsChecker.php +++ b/src/CodeInspector/StatementsChecker.php @@ -1584,7 +1584,7 @@ class StatementsChecker if ($return_type_part === '$' . $method_param['name']) { if ($arg->value instanceof PhpParser\Node\Scalar\String_) { - $return_type_part = $arg->value->value; + $return_type_part = preg_replace('/^\\\/', '', $arg->value->value); break; } }