This file is indexed.

/usr/share/php/data/PHP_PMD/resources/rulesets/unusedcode.xml is in phpmd 1.5.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0"?>

<ruleset name="Unused Code Rules"
         xmlns="http://pmd.sf.net/ruleset/1.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
    <description>
The Unused Code Ruleset contains a collection of rules that find unused code.
    </description>

    <rule name="UnusedPrivateField"
          since="0.2"
          message="Avoid unused private fields such as '{0}'."
          class="PHP_PMD_Rule_UnusedPrivateField"
          externalInfoUrl="http://phpmd.org/rules/unusedcode.html#unusedprivatefield">
        <description>
Detects when a private field is declared and/or assigned a value, but not used.
        </description>
        <priority>3</priority>
        <example>
<![CDATA[
class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}
]]>
        </example>
    </rule>

    <rule name="UnusedLocalVariable"
          since="0.2"
          message="Avoid unused local variables such as '{0}'."
          class="PHP_PMD_Rule_UnusedLocalVariable"
          externalInfoUrl="http://phpmd.org/rules/unusedcode.html#unusedlocalvariable">
        <description>
Detects when a local variable is declared and/or assigned, but not used.
        </description>
        <priority>3</priority>
        <example>
<![CDATA[
class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}
]]>
        </example>
    </rule>

    <rule name="UnusedPrivateMethod"
          since="0.2"
          message="Avoid unused private methods such as '{0}'."
          class="PHP_PMD_Rule_UnusedPrivateMethod"
          externalInfoUrl="http://phpmd.org/rules/unusedcode.html#unusedprivatemethod">
        <description>
Unused Private Method detects when a private method is declared but is unused.
        </description>
        <priority>3</priority>
        <example>
<![CDATA[
class Something
{
    private function foo() {} // unused
}
]]>
        </example>
    </rule>

    <rule name="UnusedFormalParameter"
          since="0.2"
          message="Avoid unused parameters such as '{0}'."
          class="PHP_PMD_Rule_UnusedFormalParameter"
          externalInfoUrl="http://phpmd.org/rules/unusedcode.html#unusedformalparameter">
        <description>
Avoid passing parameters to methods or constructors and then not using those parameters.
        </description>
        <priority>3</priority>
        <example>
<![CDATA[
class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}
]]>
        </example>
    </rule>

</ruleset>