Since this package is designed to fit into a WordPress-envoirment, Exceptions could lead to broken sites (WordPress does not handle Exceptions by default).
Exception in set_options
Maybe we should change the behavior of set_options from throwing an InvalidArgumentException to a more "wordpressy"-way by using _doing_it_wrong() and not setting the given configuration to the $options-array.
Usage of _doing_it_wrong in Inpsyde\Filter\WordPress
The other point which has to be discussed is the _doing_it_wrong in Inpsyde\Filter\WordPress folder, when a incorrect $value-type is given. I think just returning the value and triggering a _doing_it_wrong seems to be ok, since WordPress does nothing (no error message, just continue with something similar or even break) against wrong values.
Since this package is designed to fit into a WordPress-envoirment, Exceptions could lead to broken sites (WordPress does not handle Exceptions by default).
Exception in set_options
Maybe we should change the behavior of
set_optionsfrom throwing anInvalidArgumentExceptionto a more "wordpressy"-way by using_doing_it_wrong()and not setting the given configuration to the$options-array.Usage of
_doing_it_wronginInpsyde\Filter\WordPressThe other point which has to be discussed is the
_doing_it_wronginInpsyde\Filter\WordPressfolder, when a incorrect$value-type is given. I think just returning the value and triggering a_doing_it_wrongseems to be ok, since WordPress does nothing (no error message, just continue with something similar or even break) against wrong values.