wol-soft/php-json-schema-model-generator

View on GitHub
src/Utils/TypeConverter.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

declare(strict_types=1);

namespace PHPModelGenerator\Utils;

class TypeConverter
{
    public static function gettypeToInternal(string $type): string
    {
        return [
            'boolean' => 'bool',
            'integer' => 'int',
            'double' => 'float',
        ][$type] ?? $type;
    }
}