We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Follow up to the Interface Segregation Principle violation fix PR #1
I propose to extract ReactionTypeable interface from Reaction & ReactionCounter models. It will be a breaking change.
ReactionTypeable
Reaction
ReactionCounter
interface ReactionTypeable { public function getReactionType(): ReactionType; public function isOfReactionType(ReactionType $type): bool; public function isNotOfReactionType(ReactionType $type): bool; }
$reactionType = $reaction->getReactionType(); $isTrue = $reaction->isOfReactionType($reactionType); $isFalse = $reaction->isNotOfReactionType($reactionType); $reactionType = $counter->getReactionType(); $isTrue = $counter->isOfReactionType($reactionType); $isFalse = $counter->isNotOfReactionType($reactionType);
reaction
public function getType(): ReactionType; public function isOfType(ReactionType $type): bool; public function isNotOfType(ReactionType $type): bool;
public function getReactionType(): ReactionType; public function isReactionOfType(ReactionType $type): bool; public function isNotReactionOfType(ReactionType $type): bool;
getReactionType
getType
isOfReactionType
isOfType
isReactionOfType
isNotOfReactionType
isNotOfType
isNotReactionOfType
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Follow up to the Interface Segregation Principle violation fix PR #1
I propose to extract
ReactionTypeable
interface fromReaction
&ReactionCounter
models. It will be a breaking change.Current implementation
Reaction
model doesn't havereaction
word because initially I've thought that it's redundant:ReactionCounter
model:getReactionType
getType
getReactionType
(same)isOfReactionType
isOfType
isReactionOfType
isNotOfReactionType
isNotOfType
isNotReactionOfType
The text was updated successfully, but these errors were encountered: