Download this file
29 lines (21 with data), 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 | <?php
/**
* This file is an exemple of PHP file containing unused code.
* This file should generate 4 warnings with the default config.
*/
class Unused {
// 1 - checkUnusedPrivateFunctions (never called inside the class)
/**
* Unused private function
*
* @param String $a
* @param String $b
* @return String
*/
private function _testUnused($a, $b) { // 2- checkUnusedFunctionParameters ($b is never used)
$c = $a + 1;
$c .= $a; // 3 - checkUnusedVariables ($c is declared twice but never used)
return $a;
$a = $a + 2; // 4 - checkUnusedCode (code after the return)
}
}
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.