Skip to content

Commit

Permalink
Update README.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
david_smith committed Nov 21, 2024
1 parent 9156e91 commit 1bbd950
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ class User

#[Describe([
'cast' => [self::class, 'when'],
'eval' => '$value >= $context["value_2"]' // The expression to evaluate.
'true' => [MyAction::class, 'passed'], // Optional. Invoked when condition is true.
'false' => [MyAction::class, 'failed'], // Optional. Invoked when condition is true.
'required', // Throws PropertyRequiredException when value not present.
'eval' => <<<'PHP' // Provides (mixed $value, array $context, ?ReflectionAttribute $Attribute, ReflectionProperty $Property)
$value >= $context["value_2"] // The expression to evaluate.
PHP,
'true' => [MyAction::class, 'passed'], // Optional. Invoked when condition is true.
'false' => [MyAction::class, 'failed'], // Optional. Invoked when condition is true.
'required', // Throws PropertyRequiredException when value not present.
])]
public string $value;
}
Expand Down

0 comments on commit 1bbd950

Please sign in to comment.