Skip to content

Commit 2809b21

Browse files
committed
prefix function to avoid any collisions
1 parent a4d4b0c commit 2809b21

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

php-templates/middleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
function getReflectionMethod(ReflectionClass $reflected): ReflectionMethod {
3+
function vsCodeGetReflectionMethod(ReflectionClass $reflected): ReflectionMethod {
44
return match (true) {
55
$reflected->hasMethod('__invoke') => $reflected->getMethod('__invoke'),
66
default => $reflected->getMethod('handle'),
@@ -29,7 +29,7 @@ function getReflectionMethod(ReflectionClass $reflected): ReflectionMethod {
2929
}
3030

3131
$reflected = new ReflectionClass($m);
32-
$reflectedMethod = getReflectionMethod($reflected);
32+
$reflectedMethod = vsCodeGetReflectionMethod($reflected);
3333

3434
return [
3535
"class" => $m,
@@ -45,7 +45,7 @@ function getReflectionMethod(ReflectionClass $reflected): ReflectionMethod {
4545
}
4646

4747
$reflected = new ReflectionClass($middleware);
48-
$reflectedMethod = getReflectionMethod($reflected);
48+
$reflectedMethod = vsCodeGetReflectionMethod($reflected);
4949

5050
$result = array_merge($result, [
5151
"class" => $middleware,

src/templates/middleware.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file was generated from php-templates/middleware.php, do not edit directly
22
export default `
3-
function getReflectionMethod(ReflectionClass $reflected): ReflectionMethod {
3+
function vsCodeGetReflectionMethod(ReflectionClass $reflected): ReflectionMethod {
44
return match (true) {
55
$reflected->hasMethod('__invoke') => $reflected->getMethod('__invoke'),
66
default => $reflected->getMethod('handle'),
@@ -29,7 +29,7 @@ echo collect(app("Illuminate\\Contracts\\Http\\Kernel")->getMiddlewareGroups())
2929
}
3030
3131
$reflected = new ReflectionClass($m);
32-
$reflectedMethod = getReflectionMethod($reflected);
32+
$reflectedMethod = vsCodeGetReflectionMethod($reflected);
3333
3434
return [
3535
"class" => $m,
@@ -45,7 +45,7 @@ echo collect(app("Illuminate\\Contracts\\Http\\Kernel")->getMiddlewareGroups())
4545
}
4646
4747
$reflected = new ReflectionClass($middleware);
48-
$reflectedMethod = getReflectionMethod($reflected);
48+
$reflectedMethod = vsCodeGetReflectionMethod($reflected);
4949
5050
$result = array_merge($result, [
5151
"class" => $middleware,

0 commit comments

Comments
 (0)