alexpts/php-data-transformer

View on GitHub
src/PTS/DataTransformer/Types/BoolType.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace PTS\DataTransformer\Types;

class BoolType
{
    /**
     * @param bool $value
     * @return bool
     */
    public function toModel($value)
    {
        return (bool) $value;
    }

    /**
     * @param bool $value
     * @return bool
     */
    public function toData($value)
    {
        return (bool) $value;
    }
}