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

Method body extract error with express static::class #44

Closed
wenbinye opened this issue Sep 13, 2020 · 1 comment
Closed

Method body extract error with express static::class #44

wenbinye opened this issue Sep 13, 2020 · 1 comment

Comments

@wenbinye
Copy link

Bug Report

Q A
Version(s) 3.4.1

Summary

class Foo
{
    public static function test() {
        return static::class;
    }
}

$class = \Laminas\Code\Generator\ClassGenerator::fromReflection(
    new \Laminas\Code\Reflection\ClassReflection(Foo::class));
echo $class->generate();

The test method body was not extract successfully.

Current behavior

Output code is :

class Foo
{

    public static function test()
    {
        return
    }


}

How to reproduce

Expected behavior

class Foo
{

    public static function test()
    {
        return static:class;
    }


}
@Ocramius
Copy link
Member

Ocramius commented Sep 13, 2020 via email

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

No branches or pull requests

2 participants