Hi, i tested phpcallgraph and i think it is a great tool.
I got this error when i run phpcallgraph to analyse one of my messy files :
PHP Fatal error: Uncaught exception 'ReflectionException' with message
'Cannot determine default value for internal functions'
here is my patch
===================================================================
--- instantsvc/components/CodeAnalyzer/src/code_analyzer.php (revision 1296)
+++ instantsvc/components/CodeAnalyzer/src/code_analyzer.php (working copy)
@@ -1063,8 +1063,8 @@
$result[$param->getName()]['isOptional'] = $param->isOptional();
$result[$param->getName()]['byReference'] = $param->isPassedByReference();
if ($param->isOptional()) {
- $result[$param->getName()]['hasDefault'] = $param->isDefaultValueAvailable();
- $result[$param->getName()]['defaultValue'] = $param->getDefaultValue();
+ $result[$param->getName()]['hasDefault'] = $hasDefault = $param->isDefaultValueAvailable();
+ $result[$param->getName()]['defaultValue'] = $hasDefault ? $param->getDefaultValue() : null ;
}
}
return $result;
Thanks again for the great tool
rahal
Hi everyone,
I discovered that this "issue" was due to this class been analysed :
class MyCustomException extends Exception { }
Adding a constructor to this custom exception fixed also the issue, so , please, let me know your thoughts.
Rahal