Skip to content

v1.1.17

Choose a tag to compare

@jdwx jdwx released this 27 Feb 03:03
· 59 commits to main since this release

Added Parameter::is() to easily check if a parameter matches a given value without, e.g., having a meltdown if you want to compare an array parameter to a string.

This:

$param->isString() && $param->asString( 'foo' )

is now:

$param->is( 'foo' );

Added Parameter::isBool() to determine if the parameter's value parses as a boolean. (Note that null is treated as boolean false here.) Because boolean parameters can be strings like "yes" this function is mostly a qualifier for "can I safely call asBool()?"