Skip to content

Commit 5c1e047

Browse files
[1.x] Fixed tests (#65)
* Fixed tests * Update ReflectionClosure2Test.php
1 parent fc3183f commit 5c1e047

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

tests/ReflectionClosure2Test.php

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -149,23 +149,17 @@
149149

150150
test('anonymous inside closure', function () {
151151
$f1 = function () {
152-
return new class() extends A {
153-
};
152+
return new class() extends A {};
154153
};
155154
$e1 = 'function () {
156-
return new class() extends \A
157-
{
158-
};
155+
return new class() extends \A {};
159156
}';
160157

161158
$f2 = function () {
162-
return new class() extends A implements B {
163-
};
159+
return new class() extends A implements B {};
164160
};
165161
$e2 = 'function () {
166-
return new class() extends \A implements \B
167-
{
168-
};
162+
return new class() extends \A implements \B {};
169163
}';
170164

171165
$f3 = function () {
@@ -277,8 +271,7 @@ public function x(\A $a): \B
277271
function a(Qux $q): Bar
278272
{
279273
f1();
280-
$a = new class() extends Bar {
281-
};
274+
$a = new class() extends Bar {};
282275
}
283276
};
284277
$e7 = 'function () {
@@ -289,9 +282,7 @@ function a(Qux $q): Bar
289282
function a(\Foo\Baz $q): \Foo\Bar
290283
{
291284
\Foo\f1();
292-
$a = new class() extends \Foo\Bar
293-
{
294-
};
285+
$a = new class() extends \Foo\Bar {};
295286
}
296287
}';
297288

0 commit comments

Comments
 (0)