Skip to content
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

Fix violation of the Interface Segregation Principle #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

antonkomarev
Copy link
Collaborator

@antonkomarev antonkomarev commented Dec 21, 2019

To avoid violation of Interface Segregation Principles we may extract following interfaces:

  • Nullable
  • Countable
  • Weightable

There are many ways to design package namespace.

  1. Keep these interfaces inside of the I\Love namespace
  2. Bundle interfaces in helper package like I\Support, I\Entity, etc.
  3. Create separate package for each of them:
  • I\Nullable
  • I\Countable
  • I\Weightable
  1. Mix two previous points and create bundle package with split sub-packages:
  • I\Object\Nullable
  • I\Object\Countable
  • I\Object\Weightable

@antonkomarev antonkomarev added the enhancement New feature or request label Dec 21, 2019
@antonkomarev
Copy link
Collaborator Author

antonkomarev commented Dec 21, 2019

Do we need to extract isEqualTo(self $that) & isNotEqualTo(self $that) methods from Reactant, Reacter & ReacterType models to Equalable interface?

Possible package candidate: https://github.com/php-i/comparison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant