Skip to content

MabeEnumPhpstan\EnumDynamicReturnTypeExtension::getTypeFromStaticMethodCall() cant handle static calls on variables #13

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

Merged
merged 3 commits into from
Apr 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[allow-dynamic-calls] Add test case for edge case "use class-string<e…
…num> for static access"
  • Loading branch information
pascalheidmann-check24 committed Mar 15, 2022
commit bc0a19b330c5c4cf500d65655607688d6bdf8ac1
9 changes: 9 additions & 0 deletions tests/integration/data/EnumGetValuesReturnType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

class Example
{
/** @var class-string<Enum> */
protected $enumClass = Enum::class;

/** @return array<int, float|int|string> */
public function getDynamicValues(): array
{
return $this->enumClass::getValues();
}

/** @return array<int, null> */
public static function baseMethodValid(): array
{
Expand Down