acf-codifier icon indicating copy to clipboard operation
acf-codifier copied to clipboard

Add possible parameter values for the field function documentation and error message

Open Liblastic opened this issue 2 years ago • 0 comments

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, ', ' ) . '"' );

Liblastic avatar Nov 13 '23 11:11 Liblastic