Skip to content

Commit 13aad01

Browse files
committed
ensure backslashes are escaped
1 parent 4deb317 commit 13aad01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/php/NewInstance.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ private static function createMethods(ReflectionClass $class): string
258258
$methodParams = Parameters::of($method, $class);
259259
/* @var $method \ReflectionMethod */
260260
$code .= sprintf(
261-
" #[\Override]\n%s"
261+
" #[\\Override]\n%s"
262262
. " %s function %s(%s)%s {\n"
263263
. " %s\$this->handleMethodCall('%s', func_get_args(), %s);\n"
264264
. " }\n",
265-
$class->isInternal() && $returnType->returns() ? " #[\ReturnTypeWillChange]\n" : '',
265+
$class->isInternal() && $returnType->returns() ? " #[\\ReturnTypeWillChange]\n" : '',
266266
($method->isPublic() ? 'public' : 'protected'),
267267
$method->getName(),
268268
$methodParams->code(),

0 commit comments

Comments
 (0)