This commit is contained in:
2021-03-24 19:26:40 +08:00
parent 6787d7c2ae
commit 20e12f49f3
+4 -2
View File
@@ -38,8 +38,10 @@ use Snowflake\Snowflake;
public function execute(array $handler): mixed
{
$injectValue = $this->parseInjectValue();
/** @var ReflectionProperty $handler[1] */
if (!($handler[1] instanceof ReflectionProperty)) {
$handler[1] = new ReflectionProperty($handler[0], $handler[1]);
}
/** @var ReflectionProperty $handler [1] */
if ($handler[1]->isPrivate() || $handler[1]->isProtected()) {
$method = 'set' . ucfirst($handler[1]->getName());
if (!method_exists($handler[0], $method)) {