public function toPHP($value, Driver $driver)
    {
        if ($value === null || $value === true || $value === false) {
            return $value;
        }

        if (!is_numeric($value)) {
            return strtolower($value) === 'true';
        }

        return !empty($value);
    }
public function toPHP($value, Driver $driver)
    {
        if ($value === null || $value === true || $value === false) {
            return $value;
        }

        if (!is_numeric($value)) {
            return strtolower($value) === 'true';
        }

        return !empty($value);
    }
public function toPHP ( $ value , Driver $ driver ) { if ( $ value === null || $ value === true || $ value === false ) { return $ value ; } if ( ! is_numeric ( $ value ) ) { return strtolower ( $ value ) === 'true' ; } return ! empty ( $ value ) ; }
Convert bool values to PHP booleans

@param mixed $value The value to convert.
@param \Cake\Database\Driver $driver The driver instance to convert with.
@return bool|null
Convert bool values to PHP booleans