Hi,
I found an issue related to Enum + const:
<?php
declare(strict_types=1);
namespace Devsense\Builtin;
enum MyEnum
{
case A;
case B;
public const string C = 'c';
public function myMethod()
{
return null;
}
}
class MyClass
{
public const MyEnum TEST = MyEnum::A;
}
$myClass = new MyClass();
$a = $myClass;
/**
* myMethod is unknown but TEST constant has the right type
*/
$a::TEST->myMethod();
/**
* Chained :: calls does not work
*/
var_dump(MyEnum::A::C);
- Could you check the line $a::TEST->myMethod();
the method myMethod
is unknown but the constant has the right type.
- Another issue, chained ::
calls is not implemented in your tool but works as well.
Thank you for the fixes.
Regards,