Hi,
I found an issue with the magical __get method when this one returns a specific type:
<?php
declare(strict_types=1);
namespace Devsense\Builtin;
use ArrayObject;
final class MyClass
{
public function __get(string $name): ArrayObject
{
return new ArrayObject();
}
}
$a = new MyClass();
// Test property should be an ArrayObject
$a->test->getArrayCopy();
If an @property attribute exists, of course we must merge type or keep the more specific type.
Thank you.