Skip to content

Commit 9acf2ca

Browse files
authored
Add tests for return as usage (#180)
1 parent a624c54 commit 9acf2ca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Tests/VariableAnalysisSniff/fixtures/FunctionWithUnusedParamsFixture.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@ function function_with_multi_line_unused_params(
8282
echo "xxx {$param} xxx";
8383
return $param;
8484
}
85+
86+
function function_with_only_use_of_param_as_return($param) {
87+
return $param;
88+
}
89+
90+
function function_with_only_use_of_var_as_return() {
91+
$param = 'foobar';
92+
return $param;
93+
}

0 commit comments

Comments
 (0)