Skip to content

Conversation

@mechelon
Copy link
Member

@mechelon mechelon commented Aug 7, 2021

I thought it would be useful to add the value() method to the Modifiable contract, because all modifiable properties share this method. However, while the return type of the value() method is always an inheritant of Property, the input parameter to this method differ a lot. Just compare Text with Multiselect for example, so the interface method is not suitable for inheritance (this is why all the tests fail of course).
So, one possibility is to implement the Modifiable Contract as an empty interface without any declarations just for better code readability / overview purpose. The other possibility is to toss it completely. ^^
@johguentner What do you think?

@mechelon mechelon requested a review from johguentner August 7, 2021 20:50
Copy link
Member

@johguentner johguentner left a comment

Choose a reason for hiding this comment

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

Perfect to differ between modifiable and non-modifiable properties.
Can be included just like that!

- $value is different for each property
- the empty Interface should be sufficient for checking, if the property is modifiable
@johguentner johguentner marked this pull request as ready for review August 21, 2021 18:25
@johguentner johguentner merged commit 3683d2c into dev Aug 21, 2021
@mechelon mechelon deleted the feature/modifiable branch June 17, 2022 15:43
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