Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding float as valid type. #12

Merged
merged 6 commits into from
Sep 9, 2024
Merged

Adding float as valid type. #12

merged 6 commits into from
Sep 9, 2024

Conversation

stratease
Copy link
Contributor

@stratease stratease commented Aug 30, 2024

Allow the float datatype.

class MyModel extends Model {
	protected $properties = [
		'total_query_time'   => 'float'
	];
...

@stratease stratease self-assigned this Aug 30, 2024
@stratease stratease marked this pull request as ready for review August 30, 2024 14:43
Copy link
Contributor

@JasonTheAdams JasonTheAdams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good add! Can we please add a unit test for this?

Thank you!

@stratease
Copy link
Contributor Author

Good add! Can we please add a unit test for this?

Thank you!

@JasonTheAdams added float to the type test.

src/Models/Model.php Outdated Show resolved Hide resolved
Copy link
Contributor

@JasonTheAdams JasonTheAdams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! This is great! Minor suggestion on the test, but otherwise good!

tests/wpunit/ModelTest.php Outdated Show resolved Hide resolved
@stratease stratease merged commit 6d0d833 into main Sep 9, 2024
1 check passed
@stratease stratease deleted the feat/float-datetime branch September 9, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants