Skip to content
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

Removes default ternary check in Label view #16166

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

Godmartinz
Copy link
Collaborator

There was a ternary check for default on the 2D barcode left in the View/Label that needed to be removed.

Copy link

what-the-diff bot commented Feb 3, 2025

PR Summary

  • Enhanced Code Clarity: By readjusting the organization, or 'indentation', of a decision-making block in the code related to 'getSupport2DBarcode', its construction and function are easier to understand.
  • Simplified Logic: By eliminating an unnecessary step where we were repeatedly setting the value of 'barcode2DType' unecessarily, we've straightforwardened our internal procedures, making the system more efficient.
  • Improved Condition Check: We made it easier to understand when we are checking if 'barcode2DType' has a practical value, instead of holding a place with no value ('none') or being non-existent (null). It results in better readability of our system's internal checks.

$barcode2DType = $settings->label2_2d_type;
$barcode2DType = ($barcode2DType == 'default') ?
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is still possible for default to be what is set in existing databases right? I don't think we want to remove this check if so.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Note: @Godmartinz pointed out that default was changed in a migration in #16033.

Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Took me a minute to understand what was happening here. barcode_type isn't a column anymore so we should never attempt to use it.

@snipe snipe merged commit 5e363f7 into snipe:develop Feb 4, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants