Skip to content

Commit e2ff7e1

Browse files
committed
Fix deprecation
1 parent d804a1d commit e2ff7e1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/test/ReadAttributeTrait.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ trait ReadAttributeTrait
66
{
77
public function readAttribute(object $object, string $attribute)
88
{
9-
$refProperty = $this->getClassAttribute($object, $attribute);
10-
$refProperty->setAccessible(true);
11-
$value = $refProperty->getValue($object);
12-
$refProperty->setAccessible(false);
13-
14-
return $value;
9+
return $this->getClassAttribute($object, $attribute)->getValue($object);
1510
}
1611

1712
private function getClassAttribute(

0 commit comments

Comments
 (0)