Skip to content

Commit

Permalink
Remove ReflectionProperty::setAccessible, because calling this meth…
Browse files Browse the repository at this point in the history
…od has no effect (#449)

https: //www.php.net/manual/zh/reflectionproperty.setaccessible.php

Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia committed Nov 21, 2023
1 parent e730a0b commit 94292dc
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/TinkerCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public static function castRedis($redis): array
{
$refObject = new ReflectionObject($redis);
$refProperty = $refObject->getProperty('poolName');
$refProperty->setAccessible(true);

return [
Caster::PREFIX_PROTECTED . 'poolName' => (string) $refProperty->getValue($redis),
Expand Down

0 comments on commit 94292dc

Please sign in to comment.