-
-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
Description
This is analogue of Callback but it returns a different rule that is already being applied.
Example of usage:
/**
* @var array<int, string>
*/
private readonly array $categories;
#[CallbackRule(method: categoryIdRule)]
public int|null $categoryId = null;
private function categoryIdRule(): RuleInterface
{
return new In(array_keys($this->categories));
}