for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Stratadox\Hydration\Mapping\Simple\Type;
use Stratadox\Hydration\Mapping\Transform\KeyTransform;
use Stratadox\Hydration\Mapping\Primitive\BooleanMapping;
use Stratadox\HydrationMapping\Mapping;
final class BooleanValue
{
public static function withCustomTruths(
string $name,
array $truths,
array $falsehoods
): Mapping {
return BooleanMapping::custom($name, $truths, $falsehoods);
}
public static function withCustomTruthsAndKey(
string $key,
return KeyTransform::use(
$key,
BooleanMapping::custom($name, $truths, $falsehoods)
);
public static function inProperty(string $name): Mapping
return BooleanMapping::inProperty($name);
public static function inPropertyWithDifferentKey(
string $key
return KeyTransform::use($key, BooleanMapping::inProperty($name));