Skip to content

Commit f5bb0f6

Browse files
clxmstaabondrejmirtes
authored andcommitted
added show_source() signature, a alias of highlight_file()
1 parent 6e1b71a commit f5bb0f6

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Type/Php/VarExportFunctionDynamicReturnTypeExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function isFunctionSupported(FunctionReflection $functionReflection): boo
2525
[
2626
'var_export',
2727
'highlight_file',
28+
'show_source', // alias of highlight_file
2829
'highlight_string',
2930
'print_r',
3031
],

tests/PHPStan/Analyser/LegacyNodeScopeResolverTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2663,6 +2663,22 @@ public function dataBinaryOperations(): array
26632663
'string',
26642664
'highlight_file($string, true)',
26652665
],
2666+
[
2667+
'bool|string',
2668+
'show_source()',
2669+
],
2670+
[
2671+
'bool',
2672+
'show_source($string)',
2673+
],
2674+
[
2675+
'bool',
2676+
'show_source($string, false)',
2677+
],
2678+
[
2679+
'string',
2680+
'show_source($string, true)',
2681+
],
26662682
[
26672683
'string|true',
26682684
'print_r()',

0 commit comments

Comments
 (0)