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

Multiple calls the parent class method, there is no support #211

Open
codemagpie opened this issue Sep 30, 2022 · 0 comments
Open

Multiple calls the parent class method, there is no support #211

codemagpie opened this issue Sep 30, 2022 · 0 comments

Comments

@codemagpie
Copy link

ide version:

plugin version:

code:

<?php

declare(strict_types=1);

abstract class AbstractFoo
{
    public static array $status = [];

    /**
     * @param string $state = static::$status [$any]
     * @return static
     */
    public function writeState(string $state): AbstractFoo
    {
        return $this;
    }
}

class Foo extends AbstractFoo
{
    public static array $status = ['enable', 'disable'];

    public function todo()
    {
        $t = $this->writeState('enable') // support
            ->writeState('disable') // support
            ->writeState(''); // no support
    }
}
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

1 participant