minor #20120 [VarDumper] Fix merge (nicolas-grekas)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[VarDumper] Fix merge

| Q             | A
| ------------- | ---
| Branch?       | master"
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

f5703e5 [VarDumper] Fix merge
This commit is contained in:
Fabien Potencier 2016-10-01 11:01:06 -07:00
commit 9362b8cbda

View File

@ -157,8 +157,8 @@ class ReflectionCaster
));
if (isset($a[$prefix.'returnType'])) {
$v = (string) $a[$prefix.'returnType'];
$a[$prefix.'returnType'] = new ClassStub($v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', ''));
$v = method_exists('ReflectionType', 'getName') ? $a[$prefix.'returnType']->getName() : $a[$prefix.'returnType']->__toString();
$a[$prefix.'returnType'] = new ClassStub(($a[$prefix.'returnType']->allowsNull() ? '?' : '').$v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', ''));
}
if (isset($a[$prefix.'class'])) {
$a[$prefix.'class'] = new ClassStub($a[$prefix.'class']);
@ -240,8 +240,7 @@ class ReflectionCaster
if (isset($a[$prefix.'typeHint'])) {
$v = $a[$prefix.'typeHint'];
$a[$prefix.'typeHint'] = new ClassStub($v, array(class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', ''));
}
if (!isset($a[$prefix.'typeHint'])) {
} else {
unset($a[$prefix.'allowsNull']);
}