Skip to content

SplitItemBuilder should reference menu styles #208

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

Merged
merged 1 commit into from
Dec 19, 2019
Merged

SplitItemBuilder should reference menu styles #208

merged 1 commit into from
Dec 19, 2019

Conversation

jtreminio
Copy link
Contributor

Related to #205

@@ -171,12 +158,12 @@ public function build() : SplitItem

public function getCheckboxStyle() : CheckboxStyle
{
return $this->checkboxStyle;
return $this->menu->getCheckboxStyle();
}

public function setCheckboxStyle(CheckboxStyle $style) : self
Copy link
Member

Choose a reason for hiding this comment

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

Can we drop the setters?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry and the modify* methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SplitItemBuilder::setCheckboxStyle() is called from CliMenuBuilder::addSplitItem() so the split item can inherit the parent styles.

@codecov-io
Copy link

Codecov Report

Merging #208 into item-style will decrease coverage by 0.25%.
The diff coverage is 66.66%.

Impacted file tree graph

@@               Coverage Diff                @@
##             item-style     #208      +/-   ##
================================================
- Coverage         92.73%   92.48%   -0.26%     
+ Complexity          561      559       -2     
================================================
  Files                30       30              
  Lines              1693     1689       -4     
================================================
- Hits               1570     1562       -8     
- Misses              123      127       +4
Impacted Files Coverage Δ Complexity Δ
src/Builder/CliMenuBuilder.php 78.76% <100%> (-0.19%) 76 <0> (-2)
src/Builder/SplitItemBuilder.php 70.31% <50%> (-6.97%) 20 <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 da43609...0f1db5f. Read the comment docs.

@AydinHassan AydinHassan merged commit 4ea4242 into php-school:item-style Dec 19, 2019
@AydinHassan
Copy link
Member

OK it works but I can't wrap my head around it. It's getting late here now anyway, need to sleep.

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