-
Notifications
You must be signed in to change notification settings - Fork 278
Fix codestyle errors #3146
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
base: main
Are you sure you want to change the base?
Fix codestyle errors #3146
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -1801,8 +1801,7 @@ public function checkNewVersion(): string|false { | |||||||||
} | ||||||||||
} | ||||||||||
} | ||||||||||
} | ||||||||||
elseif ($this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release) { | ||||||||||
} elseif ($this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release) { | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I do think this is only slightly better. I would keep the original line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For me the line doesn't feel too long but if others think it does, we should come up with a way to make it shorter. I really don';t think the original, which saves 2 characters but has the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If these enums are always written like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that makes sense and is indeed beter to read
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternative is to shorten UpdateStrategy to US for this inclusion. I think we shouldn't change this though. |
||||||||||
/* Steer towards the latest version directly | ||||||||||
* So the expected path would be: | ||||||||||
* DJ6.0.0 -> DJ9.1.2 | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1082,10 +1082,10 @@ public static function extendMaxExecutionTime(int $minimumMaxExecutionTime): voi | |
/** | ||
* Call ob_flush() unless the top-level output buffer does not allow it. | ||
*/ | ||
public static function ob_flush_if_possible(): bool | ||
public static function ob_flush_if_possible(): bool // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mentioned this one in slack, but I see it's already annotated. I wrote it like this on purpose snice it wraps |
||
{ | ||
$status = ob_get_status(); | ||
if ( empty($status) || ($status['flags'] & PHP_OUTPUT_HANDLER_CLEANABLE) ) { | ||
if (empty($status) || ($status['flags'] & PHP_OUTPUT_HANDLER_CLEANABLE)) { | ||
return ob_flush(); | ||
} | ||
return false; | ||
|
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.
I think that short statements like this are shorter and clearer as is.