Skip to content

Add default true to bool toggle methods in Alert, Dropdown, and…#125

Open
WarLikeLaux wants to merge 2 commits intoyiisoft:masterfrom
WarLikeLaux:fix-bool-toggle-default-consistency
Open

Add default true to bool toggle methods in Alert, Dropdown, and…#125
WarLikeLaux wants to merge 2 commits intoyiisoft:masterfrom
WarLikeLaux:fix-bool-toggle-default-consistency

Conversation

@WarLikeLaux
Copy link
Contributor

Q A
Is bugfix?
New feature?
Docs added?
Tests added? ✔️
Breaks BC?
Fixed issues

What does this PR do?

Add default true to bool toggle methods for consistency. Alert::headerContainer() already had = true, but bodyContainer(), Dropdown::container(), itemContainer(), Menu::activateItems(), container(), and itemsContainer() did not.

Tests verify that calling these methods without an argument produces the same result as calling with true, preventing accidental removal of the default.

No BC break: adding a default value to an existing parameter is backward compatible.

Coverage

File Lines
Alert.php 139/139 (100%)
Dropdown.php 210/210 (100%)
Menu.php 193/193 (100%)

@codecov
Copy link

codecov bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e57424b) to head (66a1ccd).

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #125   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       283       283           
===========================================
  Files              8         8           
  Lines            892       892           
===========================================
  Hits             892       892           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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