Skip to content

Conversation

AydinHassan
Copy link
Member

No description provided.

@AydinHassan AydinHassan requested a review from Lynesth May 16, 2018 13:18
@codecov-io
Copy link

codecov-io commented May 16, 2018

Codecov Report

Merging #157 into master will increase coverage by 0.37%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #157      +/-   ##
============================================
+ Coverage     97.83%   98.21%   +0.37%     
- Complexity      417      482      +65     
============================================
  Files            25       25              
  Lines          1294     1401     +107     
============================================
+ Hits           1266     1376     +110     
+ Misses           28       25       -3
Impacted Files Coverage Δ Complexity Δ
src/CliMenu.php 99.71% <0%> (+1.33%) 159% <0%> (+65%) ⬆️

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 7dfdf75...9e6d669. Read the comment docs.

README.md Outdated
2. `addSplitItem` returns an instance of `SplitItemBuilder`, the main menu will take care of building all split items (and any submenu they might contain).
3. You can call `addItem`, `addSubMenu` and `addStaticItem` on the `SplitItemBuilder`.
4. Like when building submenus, you can call `end()` on the Split Item `SplitItemBuilder` instance to get the parent `CliMenuBuilder` back again. This is useful for chaining.
1. The first parameter to `addSubMenu` is a closure, which will be invoked with a new instance of `SplitItemBuilder` which you can use to add items to the split item.
Copy link
Collaborator

Choose a reason for hiding this comment

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

addSplitItem not addSubMenu

4. Like when building submenus, you can call `end()` on the Split Item `SplitItemBuilder` instance to get the parent `CliMenuBuilder` back again. This is useful for chaining.
1. The first parameter to `addSubMenu` is a closure, which will be invoked with a new instance of `SplitItemBuilder` which you can use to add items to the split item.
2. You can call `addItem`, `addSubMenu` and `addStaticItem` on the `SplitItemBuilder`.
3. `SplitItemBuilder` has a fluent interface so you can chain method calls.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a note that like the addSubMenu, the closure used to build the splititem is also binded with the SplitItemBuilder blablabla

Copy link
Collaborator

@Lynesth Lynesth left a comment

Choose a reason for hiding this comment

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

👍

@AydinHassan AydinHassan merged commit 49d562f into master May 16, 2018
@AydinHassan AydinHassan deleted the builder-docs branch May 16, 2018 15:10
@AydinHassan AydinHassan added this to the 3.0 milestone May 16, 2018
@php-school php-school deleted a comment from AydinHassan May 17, 2018
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