Make UnitEnum name property non-empty#6964
Make UnitEnum name property non-empty#6964orklah merged 2 commits intovimeo:masterfrom ricardoboss:master
Conversation
|
Thanks, that's great! |
|
Hi @orklah, it seems I made a mistake somewhere: https://psalm.dev/r/1bf1de16e0 Any idea why this PR didn't fix this? |
|
I found these snippets: https://psalm.dev/r/1bf1de16e0<?php
interface A {
/**
* @return non-empty-string
*/
public function getName(): string;
}
enum B implements A {
case Test;
public function getName(): string
{
return $this->name;
}
} |
|
Yeah, sorry, I should have thought about that, there's special code for handling ->name on enums here: I wonder if we could drop the whole block now that we have a stub... Do you mind trying that? If it doesn't work, then we need to replace Type::getString by a Type::getNonEmptyString() |
|
I'll look into it! |
|
So I tried flat-out removing the |
|
that's fine, thanks for your help! |
No description provided.