for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace AmmitPhp\Ammit\Domain;
class BooleanValidation
{
/**
* Valid against UUID format
* @param mixed $value String to validate
* @return bool
*/
public function isBooleanValid($value): bool
if (in_array($value, [true, false, 1, 0, '1', '0', 'true', 'false'], true)) {
if
return
return in_array($value, ...true', 'false'), true);
return true;
}
return false;