Skip to content

Commit

Permalink
QA: Add TODO comment
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Aug 25, 2024
1 parent 90d4dd5 commit fab6891
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/php/lang/reflection/Property.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public function constraint() {
*/
public function get(?object $instance) {
try {

// TODO: Remove superfluous call to setAccessible() if on PHP8.1+
// see https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
$this->reflect->setAccessible(true);
return $this->reflect->getValue($instance);
} catch (ReflectionException $e) {
Expand All @@ -68,6 +71,9 @@ public function get(?object $instance) {
*/
public function set(?object $instance, $value) {
try {

// TODO: Remove superfluous call to setAccessible() if on PHP8.1+
// see https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
$this->reflect->setAccessible(true);
$this->reflect->setValue($instance, $value);
return $value;
Expand Down

0 comments on commit fab6891

Please sign in to comment.