We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d804a1d commit e2ff7e1Copy full SHA for e2ff7e1
pkg/test/ReadAttributeTrait.php
@@ -6,12 +6,7 @@ trait ReadAttributeTrait
6
{
7
public function readAttribute(object $object, string $attribute)
8
9
- $refProperty = $this->getClassAttribute($object, $attribute);
10
- $refProperty->setAccessible(true);
11
- $value = $refProperty->getValue($object);
12
- $refProperty->setAccessible(false);
13
-
14
- return $value;
+ return $this->getClassAttribute($object, $attribute)->getValue($object);
15
}
16
17
private function getClassAttribute(
0 commit comments