Add some more truth states to test

This commit is contained in:
Nabeel Shahzad
2018-01-21 13:52:55 -05:00
parent 0b9654cf61
commit 33cbceaa92

View File

@@ -10,12 +10,18 @@ if(!function_exists('get_truth_state')) {
function get_truth_state($state)
{
$enabledStates = [
'yes',
'y',
'on',
'true',
'1',
true,
];
if(is_string($state)) {
$state = strtolower($state);
}
return \in_array($state, $enabledStates, false);
}
}