Skip to content

Conversation

nickygerritsen
Copy link
Member

No description provided.

}
}
elseif ($this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release) {
} elseif ($this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
} elseif ($this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release) {
} elseif (
$this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release
) {

I do think this is only slightly better. I would keep the original line.

Copy link
Member Author

Choose a reason for hiding this comment

The 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 } weirdly on its own line, makes it better.

Copy link
Member

Choose a reason for hiding this comment

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

If these enums are always written like UpdateStrategy::Strategy_major_release, then why does it contain "strategy" twice? Removing that would fix this case and in general produce shorter lines.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that makes sense and is indeed beter to read

Copy link
Member

@vmcj vmcj Oct 8, 2025

Choose a reason for hiding this comment

The 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.

if ($tmpValue === null) continue;
if ($tmpValue === null) {
continue;
}
Copy link
Member

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.

* 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
Copy link
Member

Choose a reason for hiding this comment

The 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 ob_flush.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants