Skip to content

Bug: type casting int|float always returns an int #28

Description

@Carlwirkus

Detailed description

When type casting a property as float|int the property's value is changed to an int.

/**
* @property-read float|int $amount
*/
class AgencyFeeData{}

...

$dto = AgencyFeeData::make(['amount' => 123.123]);

// expected
$dto->amount // 123.123

//actual
$dto->amount // 123

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions