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 possible parameter values for the field function documentation and error message #121

Open
Liblastic opened this issue Nov 13, 2023 · 0 comments

Comments

@Liblastic
Copy link
Contributor

Liblastic commented Nov 13, 2023

docblock example
@param string $new_lines New line handling way. Possible values: 'wpautop', 'br', ''.

Error message suggestion:
For example ( new Textarea( 'test' ) )->set_new_lines( 'wrong-parameter-value' ) could return error message:

throw new \Geniem\ACF\Exception( 'Geniem\ACF\Textarea: set_new_lines() does not accept argument "' . $new_lines . ' Possible values' . implode( $possible_values, ', ' ) . '"' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant