I have a peeeen... https://psalm.dev/r/b73e668896
I have an apple... https://psalm.dev/r/f133ab4d64
Uh https://psalm.dev/r/ce4be3b3b9
I found these snippets:
https://psalm.dev/r/b73e668896
<?php
class C
{
public function foo(): string
{
return __DIR__;
}
}
Psalm output (using commit 4295f95):
No issues!
https://psalm.dev/r/f133ab4d64
<?php
class C
{
public const FOO = 'string';
public function foo(): string
{
return self::FOO;
}
}
Psalm output (using commit 4295f95):
No issues!
https://psalm.dev/r/ce4be3b3b9
<?php
class C
{
public const FOO = __DIR__;
public function foo(): string
{
return self::FOO;
}
}
Psalm output (using commit 4295f95):
INFO: MixedReturnStatement - 9:16 - Could not infer a return type
INFO: MixedInferredReturnType - 7:28 - Could not verify return type 'string' for C::foo
Looks like now it fixed, last example produce "No issues!" - https://psalm.dev/r/ce4be3b3b9
I found these snippets:
https://psalm.dev/r/ce4be3b3b9
<?php
class C
{
public const FOO = __DIR__;
public function foo(): string
{
return self::FOO;
}
}
Psalm output (using commit 04b6dfd):
No issues!
I believe it's fixed in #3602
Thank you, guys!