bingo-soft /
jabe
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Jabe\Impl\JobExecutor; |
||||||
| 4 | |||||||
| 5 | use Jabe\Impl\Interceptor\CommandContext; |
||||||
| 6 | use Jabe\Impl\Persistence\Entity\{ |
||||||
| 7 | EventSubscriptionEntity, |
||||||
| 8 | ExecutionEntity, |
||||||
| 9 | JobEntity |
||||||
| 10 | }; |
||||||
| 11 | |||||||
| 12 | class ProcessEventJobHandler implements JobHandlerInterface |
||||||
| 13 | { |
||||||
| 14 | public const TYPE = "event"; |
||||||
| 15 | |||||||
| 16 | public function getType(): string |
||||||
| 17 | { |
||||||
| 18 | return self::TYPE; |
||||||
| 19 | } |
||||||
| 20 | |||||||
| 21 | public function execute(JobHandlerConfigurationInterface $configuration, ExecutionEntity $execution, CommandContext $commandContext, ?string $tenantId): void |
||||||
| 22 | { |
||||||
| 23 | // lookup subscription: |
||||||
| 24 | $eventSubscriptionId = $configuration->getEventSubscriptionId(); |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 25 | $eventSubscription = $commandContext->getEventSubscriptionManager() |
||||||
| 26 | ->findEventSubscriptionById($eventSubscriptionId); |
||||||
| 27 | |||||||
| 28 | // if event subscription is null, ignore |
||||||
| 29 | if ($eventSubscription !== null) { |
||||||
| 30 | $eventSubscription->eventReceived(null, false); |
||||||
|
0 ignored issues
–
show
The call to
Jabe\Impl\Persistence\En...Entity::eventReceived() has too few arguments starting with businessKey.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue. If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above. Loading history...
|
|||||||
| 31 | } |
||||||
| 32 | } |
||||||
| 33 | |||||||
| 34 | public function newConfiguration(string $canonicalString): JobHandlerConfigurationInterface |
||||||
| 35 | { |
||||||
| 36 | return new EventSubscriptionJobConfiguration($canonicalString); |
||||||
| 37 | } |
||||||
| 38 | |||||||
| 39 | public function onDelete(JobHandlerConfigurationInterface $configuration, JobEntity $jobEntity): void |
||||||
| 40 | { |
||||||
| 41 | // do nothing |
||||||
| 42 | } |
||||||
| 43 | } |
||||||
| 44 |