Ocramius/CodeGenerationUtils — pull request #1 by sjparkinson (2014-09-05 15:56:10+00:00)
Title: Pass ...Expr_ConstFetch a ...Node_Name if isDefaultValueConstant is true

Currently PHPParser_Node_Expr_ConstFetch is [being passed a string](https://github.com/Ocramius/CodeGenerationUtils/blob/0.1.0/src/CodeGenerationUtils/ReflectionBuilder/ClassBuilder.php#L208-L210) by [ReflectionParameter::getDefaultValueConstantName](http://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php) when the constructor actually expects a PHPParser_Node_Name as the first argument.

I've added a test to cover the code, happy to change the way I've implemented the test, couldn't work out how to cleanly pass ReflectionClass a class that has a method with the right arguments.

The error this resolves:

> Argument 1 passed to PHPParser_Node_Expr_ConstFetch::__construct() must be an instance of PHPParser_Node_Name, string given, called in CodeGenerationUtils/ReflectionBuilder/ClassBuilder.php on line 209