php-school / cli-menu

🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.
http://www.phpschool.io
MIT License
1.94k stars 106 forks source link

Initial checkable item support #186

Closed jtreminio closed 4 years ago

jtreminio commented 4 years ago

edit: Ready for merging.

Related to #185

codecov-io commented 4 years ago

Codecov Report

Merging #186 into master will decrease coverage by 0.09%. The diff coverage is 91.17%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #186     +/-   ##
===========================================
- Coverage     93.29%   93.19%   -0.1%     
- Complexity      460      486     +26     
===========================================
  Files            26       27      +1     
  Lines          1402     1470     +68     
===========================================
+ Hits           1308     1370     +62     
- Misses           94      100      +6
Impacted Files Coverage Δ Complexity Δ
src/Builder/CliMenuBuilder.php 83.67% <100%> (+0.78%) 65 <3> (+3) :arrow_up:
src/MenuStyle.php 97.14% <100%> (+0.15%) 74 <4> (+4) :arrow_up:
src/MenuItem/CheckableItem.php 86.66% <86.66%> (ø) 19 <19> (?)

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 d80c749...86416ab. Read the comment docs.

jtreminio commented 4 years ago

I think we should drop item extra support from this item, I can't imagine it being very useful in this circumstance. What do you think?

Overall it looks great. I've left a few other comments to address, mostly regarding renaming a few things. But I'd say go ahead and add tests :)

/cc @mikeymike

Would prefer this be a separate PR.

jtreminio commented 4 years ago

Pending unit tests.

AydinHassan commented 4 years ago

LGTM! Thanks a lot @jtreminio