for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PhpWinTools\Support;
class BooleanModule
{
public static function makeBoolean($value): bool
$value = strtolower($value);
if ($value === true || $value === false) {
return $value;
return $value
string
boolean
}
if ($value === 'true') {
return true;
if ($value === 'false') {
return false;
if ($value === 1 || $value === '1') {
if ($value === 0 || $value === '0') {
if (is_array($value)) {
is_array($value)
false
return !empty($value);
if (trim($value) !== '') {
} else {