File tree 3 files changed +10
-17
lines changed
3 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ protected function setUp() : void
22
22
23
23
public function testIssue () : void
24
24
{
25
- $ test = $ this ;
26
25
$ user = new CmsUser ();
27
26
$ uow = $ this ->em ->getUnitOfWork ();
28
27
@@ -39,8 +38,8 @@ public function testIssue() : void
39
38
$ listener
40
39
->expects ($ this ->once ())
41
40
->method (Events::postFlush)
42
- ->will ($ this ->returnCallback (static function () use ($ uow, $ test ) {
43
- $ test -> assertAttributeEmpty ('extraUpdates ' , $ uow , 'ExtraUpdates are reset before postFlush ' );
41
+ ->will ($ this ->returnCallback (static function () use ($ uow ) {
42
+ self :: assertAttributeEmpty ('extraUpdates ' , $ uow , 'ExtraUpdates are reset before postFlush ' );
44
43
}));
45
44
46
45
$ this ->em ->getEventManager ()->addEventListener (Events::postFlush, $ listener );
Original file line number Diff line number Diff line change @@ -154,23 +154,19 @@ class DDC3644User
154
154
155
155
public function setAddresses (Collection $ addresses )
156
156
{
157
- $ self = $ this ;
158
-
159
157
$ this ->addresses = $ addresses ;
160
158
161
- $ addresses ->map (static function ($ address) use ( $ self ) {
162
- $ address ->user = $ self ;
159
+ $ addresses ->map (function ($ address ) {
160
+ $ address ->user = $ this ;
163
161
});
164
162
}
165
163
166
164
public function setPets (Collection $ pets )
167
165
{
168
- $ self = $ this ;
169
-
170
166
$ this ->pets = $ pets ;
171
167
172
- $ pets ->map (static function ($ pet) use ( $ self ) {
173
- $ pet ->owner = $ self ;
168
+ $ pets ->map (function ($ pet ) {
169
+ $ pet ->owner = $ this ;
174
170
});
175
171
}
176
172
}
Original file line number Diff line number Diff line change @@ -335,8 +335,6 @@ public function testQuoteMetadata() : void
335
335
*/
336
336
public function testFallbackLoadingCausesEventTriggeringThatCanModifyFetchedMetadata () : void
337
337
{
338
- $ test = $ this ;
339
-
340
338
/** @var ClassMetadata $metadata */
341
339
$ metadata = $ this ->createMock (ClassMetadata::class);
342
340
$ cmf = new ClassMetadataFactory ();
@@ -350,10 +348,10 @@ public function testFallbackLoadingCausesEventTriggeringThatCanModifyFetchedMeta
350
348
$ listener
351
349
->expects ($ this ->any ())
352
350
->method ('onClassMetadataNotFound ' )
353
- ->will ($ this ->returnCallback (static function (OnClassMetadataNotFoundEventArgs $ args ) use ($ metadata , $ em, $ test ) {
354
- $ test -> assertNull ($ args ->getFoundMetadata ());
355
- $ test -> assertSame ('Foo ' , $ args ->getClassName ());
356
- $ test -> assertSame ($ em , $ args ->getObjectManager ());
351
+ ->will ($ this ->returnCallback (static function (OnClassMetadataNotFoundEventArgs $ args ) use ($ metadata , $ em ) {
352
+ self :: assertNull ($ args ->getFoundMetadata ());
353
+ self :: assertSame ('Foo ' , $ args ->getClassName ());
354
+ self :: assertSame ($ em , $ args ->getObjectManager ());
357
355
358
356
$ args ->setFoundMetadata ($ metadata );
359
357
}));
You can’t perform that action at this time.
0 commit comments