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

Refactor relations #45

Merged
merged 1 commit into from
Jan 22, 2019
Merged

Refactor relations #45

merged 1 commit into from
Jan 22, 2019

Conversation

JaZo
Copy link
Member

@JaZo JaZo commented Jan 18, 2019

Description

I refactored the relations by adding an interface for singular and plural relations.

Motivation and context

All relations behave slightly different and this PR aligns their behaviour. This should improve the code quality.

How has this been tested?

Tested using existing unit tests.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • If my change requires a change to the documentation, I have updated it accordingly.

@JaZo JaZo requested a review from bbrala January 18, 2019 16:16
Copy link
Member

@bbrala bbrala left a comment

Choose a reason for hiding this comment

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

Code seems fine and more consistent this way. Well done.

@JaZo JaZo force-pushed the feature/improve-relations branch from 33ae81e to 84aad27 Compare January 21, 2019 14:21
@JaZo
Copy link
Member Author

JaZo commented Jan 21, 2019

Code seems fine and more consistent this way. Well done.

N.B. Based on the feedback from Scrutinizer I've removed RelationInterface in favor of OneRelationInterface and ManyRelationInterface as they are actually different and RelationInterface should not be used standalone.

@JaZo JaZo force-pushed the feature/improve-relations branch 2 times, most recently from 7d7252f to a7d1b48 Compare January 21, 2019 15:11
@JaZo JaZo force-pushed the feature/improve-relations branch from a7d1b48 to 7c6eb7c Compare January 22, 2019 09:44
@JaZo JaZo merged commit b8d1ae8 into master Jan 22, 2019
@JaZo JaZo deleted the feature/improve-relations branch January 22, 2019 12:59
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.

2 participants