Skip to content

Fix return type in isInstalledShopOnsiteEligible() to ensure boolean #107

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manuelcanepa
Copy link

@manuelcanepa manuelcanepa commented Jun 18, 2025

Description (*)

This pull request ensures the isInstalledShopOnsiteEligible method always returns a boolean value.

Previously, the method returned the raw configuration value, which may be a string or null. This change explicitly casts the return value to a boolean to prevent potential type mismatches and ensure consistent behavior across usages.

Fixed Issues (if relevant)

#106

Manual testing scenarios (*)

  1. Ensure that the isInstalledShopOnsiteEligible method correctly returns true or false depending on the configuration value set in the backend.
  2. Verify that all features relying on this method behave as expected without type warnings or logic inconsistencies.

Questions or comments

If this method is used in type-sensitive contexts (e.g., strict comparisons), this change guarantees proper behavior.

Checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Fix issue magento#106. Force the return type to match with method description
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.

1 participant