-
-
Save fpapadopou/baa747b0d07719988c90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manu@Samweis PHP_PMD-git $ src/bin/phpmd --version | |
PHPMD 2.2.0 | |
manu@Samweis PHP_PMD-git $ src/bin/phpmd /tmp/short.php text /tmp/naming.xml | |
manu@Samweis PHP_PMD-git $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ruleset name="Naming 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 Naming Ruleset contains a collection of rules about names - too long, too short, and so forth. | |
</description> | |
<rule ref="rulesets/naming.xml/ShortVariable"> | |
<properties> | |
<property name="exceptions" value="id,q,i,j,v,e,f,fp" /> | |
</properties> | |
</rule> | |
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Foo | |
{ | |
public function foo($id) { | |
return $id * $id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment