Skip to content

Commit 8a126e5

Browse files
committed
Merge pull request #2 from arnested/master
Included example of using allowUnusedFunctionParameters.
2 parents 623ad7d + 45fcfe8 commit 8a126e5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ruleset.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@
3939
}
4040
-->
4141
<property name="allowUnusedCaughtExceptions" value="1"/>
42+
<!--
43+
Include the following property if you want to prevent function parametets from causing an
44+
unused variable warning, this supports the common pattern of defining callback functions that
45+
demand a fixed parameter list without actually using all the paramets.
46+
function foo ($a, $b, $c) {
47+
// Do something without ever using some of $a, $b and/or $c
48+
}
49+
-->
50+
<property name="allowUnusedFunctionParameters" value="1"/>
4251
<!--
4352
Include the following property if you want to have a whitelist of variable names
4453
that are commonly used for placeholder "junk" values that ignored and that you

0 commit comments

Comments
 (0)