private function ClassMirror::getParameterClassName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php \Prophecy\Doubler\Generator\ClassMirror::getParameterClassName()
1 call to ClassMirror::getParameterClassName()
- ClassMirror::getTypeHint in vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ Generator/ ClassMirror.php
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ Generator/ ClassMirror.php, line 200
Class
- ClassMirror
- Class mirror. Core doubler class. Mirrors specific class and/or interfaces into class node tree.
Namespace
Prophecy\Doubler\GeneratorCode
private function getParameterClassName(ReflectionParameter $parameter) {
try {
return $parameter
->getClass() ? $parameter
->getClass()
->getName() : null;
} catch (\ReflectionException $e) {
preg_match('/\\[\\s\\<\\w+?>\\s([\\w,\\\\]+)/s', $parameter, $matches);
return isset($matches[1]) ? $matches[1] : null;
}
}