Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function createCronTask($name, array $commands, $execType, \DateTime $firstRun, $interval = 0, $repeatable = 0) |
||
36 | { |
||
37 | $cronTask = new CronTask(); |
||
38 | $cronTask->setName($name); |
||
39 | $cronTask->setCommands($commands); |
||
40 | $cronTask->setExecType($execType); |
||
41 | $cronTask->setFirstRun($firstRun); |
||
42 | $cronTask->setInterval($interval); |
||
43 | $cronTask->setRepeatable($repeatable); |
||
|
|||
44 | $this->em->persist($cronTask); |
||
45 | $this->em->flush(); |
||
46 | |||
47 | return $cronTask; |
||
48 | } |
||
49 | |||
51 |
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: