klesun / deep-assoc-completion

A phpstorm plugin for associative array key typing and completion
Other
267 stars 17 forks source link

get_class_vars no support! #210

Open codemagpie opened 1 year ago

codemagpie commented 1 year ago

ide version image plugin version image get_object_vars support,but get_class_vars no support

<?php

declare(strict_types=1);
class Foo
{
    public string $name;

    public function getClassVars(): array
    {
        return get_class_vars(static::class);
    }

    public function getObjectVars(): array
    {
        return get_object_vars($this);
    }

    public function todo()
    {
        $c = $this->getClassVars()['']; // no support

        $o = $this->getObjectVars()['name']; // support
    }
}