-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve metric threshold #2440
Improve metric threshold #2440
Conversation
app/Models/Metric.php
Outdated
$messages = []; | ||
|
||
if (60 % $this->threshold !== 0) { | ||
$messages[] = 'Threshold must be divisible by 60.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the threshold must divide 60. Not the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
app/Models/Metric.php
Outdated
@@ -221,7 +221,7 @@ public function validate() | |||
$messages = []; | |||
|
|||
if (60 % $this->threshold !== 0) { | |||
$messages[] = 'Threshold must be divisible by 60.'; | |||
$messages[] = 'Threshold must divide by 60.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just divide 60
, not by.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not into 60
? The wording doesn't make sense haha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd say "The threshold must divide 60.", or we could notate this t | 60
for "t divides 60".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're a mathematician though 😂
Closes #2396
@GrahamCampbell and I have previous discussed this.