Skip to content

Conversation

marc-mabe
Copy link
Owner

@marc-mabe marc-mabe commented Oct 1, 2016

see #62

These methods create a clone of $this and change the bitset to not depend on implementation details of extended classes.

  • EnumSet::union(EnumSet ...$others) : EnumSet
  • EnumSet::intersect(EnumSet ...$others) : EnumSet
  • EnumSet::diff(EnumSet ...$others) : EnumSet
  • EnumSet::symDiff(EnumSet ...$others) : EnumSet

@marc-mabe marc-mabe added this to the 2.3.0 milestone Oct 1, 2016
@marc-mabe marc-mabe force-pushed the enumset_produce branch 2 times, most recently from 96efed1 to 3d5c3d7 Compare October 1, 2016 20:08
@marc-mabe marc-mabe changed the title [WIP] EnumSet: added methods union(), intersect(), diff() and symDiff() EnumSet: added methods union(), intersect(), diff() and symDiff() Oct 3, 2016
@marc-mabe
Copy link
Owner Author

@prolic Would you like to review ?

@prolic
Copy link
Collaborator

prolic commented Oct 5, 2016

looks good, except I would make use of variadic function and bump minimum PHP version to 5.6.

* @param EnumSet ...$other Other EnumSet(s) of the same enumeration to produce the union
* @return EnumSet
*/
public function union(EnumSet $other)
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's bump minimum required PHP version to 5.6 for this new feature and make use of variadic functions:
EnumSet::union(EnumSet ...$others)

oldschool PHP < 5.6 users can use the older version of this lib as is

@marc-mabe
Copy link
Owner Author

I created an issue #69 for next major which allows BC break including bumb min PHP version. This PR tags 2.3.0.

Anyway thanks for review !!!

@marc-mabe marc-mabe merged commit 9001835 into master Oct 6, 2016
@marc-mabe marc-mabe mentioned this pull request Oct 6, 2016
@marc-mabe marc-mabe deleted the enumset_produce branch October 6, 2016 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants