Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conditional helper methods #34

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Add conditional helper methods #34

merged 2 commits into from
Aug 22, 2023

Conversation

cjmellor
Copy link
Owner

This PR adds some helper methods to the Model to run state change based on if a conditional is met or not.

$approval->approveIf(true);
$approval->rejectIf(false);
$approval->postponeIf(true);

$approval->approveUnless(false);
$approval->rejectUnless(true);
$approval->postponeUnless(false);

@cjmellor cjmellor self-assigned this Aug 22, 2023
@cjmellor cjmellor added the enhancement New feature or request label Aug 22, 2023
@cjmellor cjmellor merged commit 26bb414 into main Aug 22, 2023
5 checks passed
@cjmellor cjmellor deleted the helper-methods branch August 22, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant