class Article implements IReactionEntity {}
factory
interface IArticleReactionFactory {
public function create(Article $entity): ReactionComponent;
}
component
class ReactionComponent {
public function __construct(IReactionEntity $entity) {}
}
Result:
Type hint for $entity in IArticleReactionFactory::create() doesn't match type hint in ReactionComponent constructor