1 | <?php |
||
26 | class TransitionScheduler |
||
27 | { |
||
28 | use WorkflowLoggerContextTrait; |
||
29 | |||
30 | /** |
||
31 | * Persistance object manager |
||
32 | * |
||
33 | * @var ObjectManager |
||
34 | */ |
||
35 | private $em; |
||
36 | |||
37 | /** |
||
38 | * Subject manipulator |
||
39 | * |
||
40 | * @var SubjectManipulator |
||
41 | */ |
||
42 | private $subjectManipulator; |
||
43 | |||
44 | /** |
||
45 | * Logger |
||
46 | * |
||
47 | * @var LoggerInterface |
||
48 | */ |
||
49 | private $logger; |
||
50 | |||
51 | /** |
||
52 | * TransitionScheduler constructor. |
||
53 | * |
||
54 | * @param ObjectManager $em entity manager |
||
55 | * @param SubjectManipulator $subjectManipulator subject manipulator |
||
56 | * @param LoggerInterface $logger logger |
||
57 | */ |
||
58 | public function __construct(ObjectManager $em, SubjectManipulator $subjectManipulator, LoggerInterface $logger) |
||
64 | |||
65 | /** |
||
66 | * Schedules transitions |
||
67 | * |
||
68 | * @param object $subject current subject |
||
69 | * @param string $workflowName workflow name |
||
70 | * @param ScheduledTransition[] $scheduledTransitions list of scheduled transitions |
||
71 | */ |
||
72 | public function scheduleTransitions($subject, $workflowName, $scheduledTransitions) |
||
116 | |||
117 | /** |
||
118 | * Reschedules already scheduled transition |
||
119 | * |
||
120 | * @param ScheduledTransition $scheduledTransition scheduled transition |
||
121 | * @param ScheduledJob $scheduledJob scheduled job for transition |
||
122 | * @param array $loggerContext logger context |
||
123 | */ |
||
124 | private function rescheduleTransitionTriggerJob(ScheduledTransition $scheduledTransition, ScheduledJob $scheduledJob, array $loggerContext) |
||
138 | |||
139 | /** |
||
140 | * Schedules transition |
||
141 | * |
||
142 | * @param ScheduledTransition $scheduledTransition scheduled transition |
||
143 | * @param Job $transitionTriggerJobToSchedule Job to be scheduled |
||
144 | * @param array $loggerContext logger context |
||
145 | */ |
||
146 | private function scheduleTransitionTriggerJob(ScheduledTransition $scheduledTransition, Job $transitionTriggerJobToSchedule, $loggerContext) |
||
165 | |||
166 | /** |
||
167 | * Calculates execution date date for scheduled transition |
||
168 | * |
||
169 | * @param ScheduledTransition $scheduledTransition scheduled transition |
||
170 | * |
||
171 | * @return \DateTime |
||
172 | */ |
||
173 | private function getTransitionTriggerExecutionDate(ScheduledTransition $scheduledTransition) |
||
180 | } |
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: