12
12
use Doctrine \Common \Comparable ;
13
13
use Doctrine \Common \EventArgs ;
14
14
use Doctrine \Common \Util \ClassUtils ;
15
+ use Doctrine \Persistence \Event \LifecycleEventArgs ;
15
16
use Doctrine \Persistence \Event \LoadClassMetadataEventArgs ;
17
+ use Doctrine \Persistence \Event \ManagerEventArgs ;
16
18
use Doctrine \Persistence \Mapping \ClassMetadata ;
17
19
use Doctrine \Persistence \ObjectManager ;
18
20
use Gedmo \Mapping \MappedEventSubscriber ;
@@ -107,6 +109,10 @@ public function loadClassMetadata(EventArgs $args)
107
109
* The synchronization of the objects in memory is done in postFlush. This
108
110
* ensures that the positions have been successfully persisted to database.
109
111
*
112
+ * @param ManagerEventArgs $args
113
+ *
114
+ * @phpstan-param ManagerEventArgs<ObjectManager> $args
115
+ *
110
116
* @return void
111
117
*/
112
118
public function onFlush (EventArgs $ args )
@@ -151,6 +157,10 @@ public function onFlush(EventArgs $args)
151
157
/**
152
158
* Update maxPositions as needed
153
159
*
160
+ * @param LifecycleEventArgs $args
161
+ *
162
+ * @phpstan-param LifecycleEventArgs<ObjectManager> $args
163
+ *
154
164
* @return void
155
165
*/
156
166
public function prePersist (EventArgs $ args )
@@ -175,6 +185,10 @@ public function prePersist(EventArgs $args)
175
185
}
176
186
177
187
/**
188
+ * @param LifecycleEventArgs $args
189
+ *
190
+ * @phpstan-param LifecycleEventArgs<ObjectManager> $args
191
+ *
178
192
* @return void
179
193
*/
180
194
public function postPersist (EventArgs $ args )
@@ -185,6 +199,10 @@ public function postPersist(EventArgs $args)
185
199
}
186
200
187
201
/**
202
+ * @param LifecycleEventArgs $args
203
+ *
204
+ * @phpstan-param LifecycleEventArgs<ObjectManager> $args
205
+ *
188
206
* @return void
189
207
*/
190
208
public function preUpdate (EventArgs $ args )
@@ -195,6 +213,10 @@ public function preUpdate(EventArgs $args)
195
213
}
196
214
197
215
/**
216
+ * @param LifecycleEventArgs $args
217
+ *
218
+ * @phpstan-param LifecycleEventArgs<ObjectManager> $args
219
+ *
198
220
* @return void
199
221
*/
200
222
public function postRemove (EventArgs $ args )
@@ -207,6 +229,10 @@ public function postRemove(EventArgs $args)
207
229
/**
208
230
* Sync objects in memory
209
231
*
232
+ * @param ManagerEventArgs $args
233
+ *
234
+ * @phpstan-param ManagerEventArgs<ObjectManager> $args
235
+ *
210
236
* @return void
211
237
*/
212
238
public function postFlush (EventArgs $ args )
0 commit comments