-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Split BeforeValidationInterface
to separate interfaces
#331
Conversation
vjik
commented
Oct 7, 2022
Q | A |
---|---|
Is bugfix? | ✔️ |
New feature? | ❌ |
Breaks BC? | ✔️ |
Fixed issues | #326 #329 |
tests/ValidatorTest.php
Outdated
skipOnEmpty: static function (mixed $value, bool $isAttributeMissing): bool { | ||
return $isAttributeMissing || $value === ''; | ||
} | ||
skipOnEmpty: static fn (mixed $value, bool $isAttributeMissing): bool => $isAttributeMissing || $value === '' |
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.
This one is too long now. We actually decided to disable this rule completely because it also transforms multiple line static functions like that. Ideally need to configure it to transform only when the result fits max line length.
Can be disabled like that - yiisoft/yii-runner-console@ff8151d.
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.
Fix line lenght in this case.
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.
👍
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #331 +/- ##
=========================================
Coverage ? 95.65%
Complexity ? 597
=========================================
Files ? 74
Lines ? 1427
Branches ? 0
=========================================
Hits ? 1365
Misses ? 62
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
skipOnEmpty: static fn ( | ||
mixed $value, | ||
bool $isAttributeMissing | ||
): bool => $isAttributeMissing || $value === '' |
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.
skipOnEmpty: static fn ( | |
mixed $value, | |
bool $isAttributeMissing | |
): bool => $isAttributeMissing || $value === '' | |
skipOnEmpty: static function (mixed $value, bool $isAttributeMissing): bool { | |
return $isAttributeMissing || $value === ''; | |
} |
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.
(Optional, code style) The style before the changes is better for one-liners in my opinion.