Make WordPress Core

Changes between Initial Version and Version 4 of Ticket #59482


Ignore:
Timestamp:
09/28/2023 03:39:43 AM (19 months ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59482

    • Property Keywords has-unit-tests added
    • Property Owner set to costdev
    • Property Status changed from new to assigned
  • Ticket #59482 – Description

    initial v4  
    1111  - Reflects a `private` or `protected` property and gets its value.
    1212  - Returns the property's value.
    13 `::reflect_and_set_value() : void`
     13`::reflect_and_set_value() : mixed`
    1414  - Reflects a `private` or `protected` property and sets its value.
     15  - Returns the previous value for convenient resetting.
    1516
    1617While this means the creation of new `Reflection<Method|Property>` objects and two calls to `::setAccessible()` for each, I think that this is worthwhile as it helps us have a more robust test suite, with less code to write in test methods. Plus, we could also explore possible caching in future.