| 1 | <?php | ||
| 22 | class ProcessArticleRulesSubscriber implements EventSubscriberInterface | ||
| 23 | { | ||
| 24 | /** | ||
| 25 | * @var RuleProcessorInterface | ||
| 26 | */ | ||
| 27 | private $ruleProcessor; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * ProcessArticleRulesSubscriber constructor. | ||
| 31 | * | ||
| 32 | * @param RuleProcessorInterface $ruleProcessor | ||
| 33 | */ | ||
| 34 | 8 | public function __construct(RuleProcessorInterface $ruleProcessor) | |
| 38 | |||
| 39 | /** | ||
| 40 |      * {@inheritdoc} | ||
| 41 | */ | ||
| 42 | 73 | public static function getSubscribedEvents() | |
| 48 | |||
| 49 | /** | ||
| 50 | * @param ArticleEvent $event | ||
| 51 | */ | ||
| 52 | 6 | public function processRules(ArticleEvent $event) | |
| 56 | } | ||
| 57 | 
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: