Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\CG\Generator\PhpMethod::fromReflection Extract body bug #19

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bronze1man
Copy link

fix #16

@schmittjoh
Copy link
Owner

Could you add some more tests for bodies with different indentations, i.e.

function foo() {
    // regular indentation
        // one more level indented
}

*/
public static function getBodyFromReflection(\ReflectionMethod $ref)
{
$start_line = $ref->getStartLine();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use camelCased variable names

@bronze1man
Copy link
Author

It breaks with two line of code.....
I get something like this:

$this->id = $a;
        if ($d === 'foo'){
            $this->enabled = true;
        }

I am working on it.

@bronze1man
Copy link
Author

test failed on

private function braceInComment()/* { */{  return 'abc';  } /* } */
  • token_get_all do not work...
  • need help!!!
  • need parse php code ?
  • need ast??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

\CG\Generator\PhpMethod::fromReflection Extract body
3 participants