| 1 | <?php |
||
| 11 | class DBActivityListener |
||
| 12 | { |
||
| 13 | /** @var ActivityManager */ |
||
| 14 | private $manager; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * DBActivityListener constructor. |
||
| 18 | * @param ActivityManager $activityManager Business logic |
||
| 19 | */ |
||
| 20 | public function __construct(ActivityManager $activityManager) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * After Loading |
||
| 27 | * @param LifecycleEventArgs $args Mongo.odm event argument |
||
| 28 | * @return void |
||
| 29 | */ |
||
| 30 | public function postLoad(LifecycleEventArgs $args) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Before saving |
||
| 37 | * @param LifecycleEventArgs $args Mongo.odm event argument |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | public function prePersist(LifecycleEventArgs $args) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Before update |
||
| 47 | * @param LifecycleEventArgs $args Mongo.odm event argument |
||
| 48 | * @return void |
||
| 49 | */ |
||
| 50 | public function preUpdate(LifecycleEventArgs $args) |
||
| 54 | |||
| 55 | |||
| 56 | /** |
||
| 57 | * Before deleting |
||
| 58 | * @param LifecycleEventArgs $args Mongo.odm event argument |
||
| 59 | * @return void |
||
| 60 | */ |
||
| 61 | public function preRemove(LifecycleEventArgs $args) |
||
| 65 | |||
| 66 | } |
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: