- if (method_exists($parameter, 'hasType')) {
- if ( ! $parameter->hasType()) {
- return '';
- }
-
- return $this->formatType($parameter->getType(), $parameter->getDeclaringFunction(), $parameter);
- }
-
- // For PHP 5.x, we need to pick the type hint in the old way (to be removed for PHP 7.0+)
- if ($parameter->isArray()) {
- return 'array';
- }
-
- if ($parameter->isCallable()) {
- return 'callable';