public static function create($value, int $scale = null): Decimal
    {
        if (\is_int($value)) {
            return self::fromInteger($value);
        } elseif (\is_float($value)) {
            return self::fromFloat($value, $scale);
        } elseif (\is_string($value)) {
            return self::fromString($value, $scale);
        } elseif ($value instanceof Decimal) {
            return self::fromDecimal($value, $scale);
        } else {
            throw new \TypeError(
                'Expected (int, float, string, Decimal), but received ' .
                (\is_object($value) ? \get_class($value) : \gettype($value))
            );
        }
    }
public static function create($value, int $scale = null): Decimal
    {
        if (\is_int($value)) {
            return self::fromInteger($value);
        } elseif (\is_float($value)) {
            return self::fromFloat($value, $scale);
        } elseif (\is_string($value)) {
            return self::fromString($value, $scale);
        } elseif ($value instanceof Decimal) {
            return self::fromDecimal($value, $scale);
        } else {
            throw new \TypeError(
                'Expected (int, float, string, Decimal), but received ' .
                (\is_object($value) ? \get_class($value) : \gettype($value))
            );
        }
    }
public static function create ( $ value , int $ scale = null ) : Decimal { if ( \ is_int ( $ value ) ) { return self :: fromInteger ( $ value ) ; } elseif ( \ is_float ( $ value ) ) { return self :: fromFloat ( $ value , $ scale ) ; } elseif ( \ is_string ( $ value ) ) { return self :: fromString ( $ value , $ scale ) ; } elseif ( $ value instanceof Decimal ) { return self :: fromDecimal ( $ value , $ scale ) ; } else { throw new \ TypeError ( 'Expected (int, float, string, Decimal), but received ' . ( \ is_object ( $ value ) ? \ get_class ( $ value ) : \ gettype ( $ value ) ) ) ; } }
Decimal "constructor".

@param  mixed $value
@param  int   $scale
@return Decimal
Decimal constructor .