ALPHA 3.0.2

This commit is contained in:
TheGamecraft
2018-09-05 11:35:41 -04:00
parent 4dbdc8fd19
commit 8ef8057bfa
771 changed files with 9284 additions and 5857 deletions

View File

@@ -77,6 +77,25 @@ class Validator
);
}
/**
* Assert that each specified variable is a boolean.
*
* @return \Dotenv\Validator
*/
public function isBoolean()
{
return $this->assertCallback(
function ($value) {
if ($value === '') {
return false;
}
return (filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE) !== NULL);
},
'is not a boolean'
);
}
/**
* Assert that each variable is amongst the given choices.
*