File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
tests/Rule/data/ForbidCustomFunctionsRule Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,9 @@ public function test(
143143 $ forbiddenConstructor ->foo ();
144144 $ union ->forbiddenMethod (); // error: Method ForbidCustomFunctionsRule\SomeClass::forbiddenMethod() is forbidden. Description 4
145145
146+ new class {};
147+ new class extends ClassWithForbiddenConstructor {}; // error: Method ForbidCustomFunctionsRule\ClassWithForbiddenConstructor::__construct() is forbidden. Description 3
148+ new class extends ClassWithForbiddenAllMethods {}; // error: Class ForbidCustomFunctionsRule\ClassWithForbiddenAllMethods is forbidden. Description 2
146149 new ClassWithForbiddenConstructor (); // error: Method ForbidCustomFunctionsRule\ClassWithForbiddenConstructor::__construct() is forbidden. Description 3
147150 new ClassWithForbiddenAllMethods (); // error: Class ForbidCustomFunctionsRule\ClassWithForbiddenAllMethods is forbidden. Description 2
148151
You can’t perform that action at this time.
0 commit comments