Skip to content

Conversation

@jtreminio
Copy link
Contributor

@jtreminio jtreminio commented Dec 17, 2019

Per this comment it makes sense for a CheckboxItem to auto-toggle itself (either on or off) vs forcing developer to implement this themselves.

CheckableItem::getSelectAction() returns a callable within a callable. The outer callable does the auto-toggling, the inner callable is the user-defined code.

The CheckableItemTest::testGetSelectAction() reflects this stacking.

@codecov-io
Copy link

codecov-io commented Dec 17, 2019

Codecov Report

Merging #193 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #193      +/-   ##
============================================
+ Coverage     93.05%   93.06%   +0.01%     
  Complexity      491      491              
============================================
  Files            27       27              
  Lines          1483     1486       +3     
============================================
+ Hits           1380     1383       +3     
  Misses          103      103
Impacted Files Coverage Δ Complexity Δ
src/MenuItem/CheckableItem.php 87.5% <100%> (+0.83%) 19 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0013aa...698e9e3. Read the comment docs.

@AydinHassan
Copy link
Member

Nice, was going to suggest this myself!

@AydinHassan AydinHassan merged commit cc01e4d into php-school:master Dec 17, 2019
@jtreminio jtreminio deleted the feature/checkable-getSelectAction branch December 17, 2019 18:47
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