Skip to content

Commit

Permalink
[DOCS] Clarify that f:constant returns an enum case
Browse files Browse the repository at this point in the history
Using

    <f:constant name: '\Vendor\Package\Enum::CASE'>

returns the enum case Enum::CASE, not the value of
given (backed) enum case.

This change clarifies this.

See also:
https://www.php.net/manual/en/function.constant.php#example-3571
  • Loading branch information
s2b authored and brotkrueml committed Nov 14, 2024
1 parent 3510df3 commit a76a715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ViewHelpers/ConstantViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
*
* {f:constant(name: '\Vendor\Package\Class::CONSTANT')}
*
* Get enum value
* --------------
* Get enum case
* -------------
*
* ::
*
Expand Down

0 comments on commit a76a715

Please sign in to comment.