Skip to content

Adding float as valid type.#12

Merged
stratease merged 6 commits intomainfrom
feat/float-datetime
Sep 9, 2024
Merged

Adding float as valid type.#12
stratease merged 6 commits intomainfrom
feat/float-datetime

Conversation

@stratease
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

Thank you!

@JasonTheAdams added float to the type test.

Comment thread src/Models/Model.php Outdated
stratease and others added 2 commits September 6, 2024 09:18
Co-authored-by: Jason Adams <jason.the.adams@gmail.com>
Copy link
Copy Markdown
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!

Comment thread tests/wpunit/ModelTest.php Outdated
Co-authored-by: Jason Adams <jason.the.adams@gmail.com>
@stratease stratease merged commit 6d0d833 into main Sep 9, 2024
@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