Skip to content

Commit 8db955e

Browse files
committed
Update to test new ideas.
Updated PHPCS from 2.* to 3.* Updated Coding standard. See build/phpcs.xml for new standard. Removed two global options Changed Setup command to extend GetOpt/Command class Set program to scan Command directory for Command which must extend GetOpt/Command Class. Signed-off-by: Sandy McNeil <[email protected]>
1 parent 886606e commit 8db955e

File tree

8 files changed

+860
-329
lines changed

8 files changed

+860
-329
lines changed

build/phpcs.xml

+26-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,32 @@
55

66
<description>PharApp Coding Standard</description>
77

8-
<!-- Default Standard is PSR2 -->
9-
<rule ref="PSR2"/>
8+
<!-- Rule Sets -->
9+
<!-- Default Standard is PSR12 -->
10+
<rule ref="PSR12"/>
1011

11-
<!-- Include the PEAR Commenting Standard to ensure code is commented -->
12-
<rule ref="PEAR.Commenting">
13-
<exclude name="PEAR.Commenting.FileComment.MissingVersion" />
14-
<exclude name="PEAR.Commenting.ClassComment.InvalidAuthors"/>
15-
<exclude name="PEAR.Commenting.ClassComment.IncompleteLicense"/>
16-
<exclude name="PEAR.Commenting.ClassComment.MissingCategoryTag"/>
17-
<exclude name="PEAR.Commenting.ClassComment.MissingLinkTag"/>
12+
<rule ref="Squiz.Commenting.FunctionComment" />
13+
<rule ref="Squiz.Commenting.FunctionCommentThrowTag" />
14+
<rule ref="Squiz.Commenting.ClassComment">
15+
<exclude name="Squiz.Commenting.ClassComment.TagNotAllowed" />
1816
</rule>
17+
<rule ref="Squiz.Commenting.FileComment">
18+
<exclude name="Squiz.Commenting.FileComment.IncorrectAuthor" />
19+
<exclude name="Squiz.Commenting.FileComment.IncorrectCopyright" />
20+
</rule>
21+
<!--<rule ref="Squiz.Commenting.VariableComment" /> -->
22+
23+
<!-- Rules to exclude -->
24+
25+
<!-- Rules to exclude from Specific files
26+
<rule ref="Generic.Files.LineLength">
27+
28+
</rule>-->
29+
<rule ref="PSR1.Files.SideEffects">
30+
<!-- Exclude from unit tests as autoloader needs to be included -->
31+
<exclude-pattern>*/tests/*</exclude-pattern>
32+
</rule>
33+
34+
<!-- Directorys to exclude as they only contain tempory files -->
35+
<exclude-pattern>*/vendor/*</exclude-pattern>
1936
</ruleset>

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"require-dev": {
1616
"macfja/phar-builder" : "*",
17-
"squizlabs/php_codesniffer": "2.*",
17+
"squizlabs/php_codesniffer": "3.*",
1818
"phpmd/phpmd" : "@stable"
1919
},
2020
"autoload": {

0 commit comments

Comments
 (0)