Skip to content

Commit

Permalink
File::getMemberProperties(): minor tweaks after readonly merge
Browse files Browse the repository at this point in the history
Follow up on 3480

I realized after the merge that I had not published a few follow up comments. Addressing those here.

* The new `is_readonly` key still needed to be added to the documentation for the `File::getMemberProperties()` method.
* For consistency in how the method is tested, adding the `is_readonly` property to all other test expectations, which makes the `testPHP81NotReadonly` test case redundant.
* Adding two additional test cases. In particular I wanted to verify (and safeguard) that the retokenization of the `?` to `T_NULLABLE` after a `readonly` keyword would not be broken (which it partially was, but that has now been fixed in 3513).
  • Loading branch information
jrfnl committed Apr 20, 2022
1 parent b314140 commit 5c8429d
Show file tree
Hide file tree
Showing 3 changed files with 359 additions and 284 deletions.
1 change: 1 addition & 0 deletions src/Files/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,7 @@ public function getMethodProperties($stackPtr)
* 'scope' => string, // Public, private, or protected.
* 'scope_specified' => boolean, // TRUE if the scope was explicitly specified.
* 'is_static' => boolean, // TRUE if the static keyword was found.
* 'is_readonly' => boolean, // TRUE if the readonly keyword was found.
* 'type' => string, // The type of the var (empty if no type specified).
* 'type_token' => integer, // The stack pointer to the start of the type
* // or FALSE if there is no type.
Expand Down
Loading

0 comments on commit 5c8429d

Please sign in to comment.