Skip to content

Commit

Permalink
Fix return type for modResource::getTVValue() (#16567)
Browse files Browse the repository at this point in the history
Correct the union of return types in documentation, so it's understood
by IDEs.

### What does it do?
IDEs like PhpStorm saw this method as returning only `null`. This change
gets them to see `null` or `mixed` as the return types.

### Why is it needed?
Described above.

### How to test
Use this method in an IDE; confirm it doesn't have any red lines under
the usages.

### Related issue(s)/PR(s)
N/A
  • Loading branch information
pbowyer authored May 20, 2024
1 parent fe2df18 commit 43ab5a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/Revolution/modResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ public function hasChildren()
*
* @param mixed $pk Either the ID of the TV, or the name of the TV.
*
* @return null/mixed The value of the TV for the Resource, or null if the
* @return null|mixed The value of the TV for the Resource, or null if the
* TV is not found.
*/
public function getTVValue($pk)
Expand Down

0 comments on commit 43ab5a2

Please sign in to comment.