diff --git a/.gitignore b/.gitignore index 8cda0f6..e65611c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,6 @@ vendor/ composer.lock -# Code Coverage +# Build +build/ log/ diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..ed0f911 --- /dev/null +++ b/build.properties @@ -0,0 +1,64 @@ +# Defaults +name=${phing.project.name} +root=${project.basedir} + +# Source +src.dir=${root}/src + +# Resources +res.dir=${root}/res + +# Vendor +vendor.dir=${root}/vendor + +# Phing +phing.exec=${vendor.dir}/phing/phing/bin/phing +phing.args= + +# Build +build.dir=${root}/build +build.bin.dir=${build.dir}/${name} +build.doc.dir=${build.dir}/doc +build.log.dir=${build.dir}/log + +# Composer +composer.exec=php composer.phar +composer.args=install --dev + +# PHP Code Sniffer +phpcs.log.dir=${build.log.dir}/phpcs +phpcs.log.xml=${phpcs.log.dir}/phpcs-output.xml +phpcs.log.json=${phpcs.log.dir}/phpcs-output.json +phpcs.log.xslt=${res.dir}/phpcs.xslt +phpcs.log.html=${phpcs.log.dir}/phpcs-output.htm +phpcs.msg=Executing PHP Code Sniffer. The output is in the '${phpcs.log.dir}' directory. +phpcs.dir=${vendor.dir}/squizlabs/php_codesniffer +phpcs.exec=${phpcs.dir}/scripts/phpcs +phpcs.args=--standard=PSR2 --report-checkstyle=${phpcs.log.xml} --report-json=${phpcs.log.json} ${src.dir} + +# PHP Mess Detector +phpmd.log.dir=${build.log.dir}/phpmd +phpmd.log.xml=${phpmd.log.dir}/phpmd-output.xml +phpmd.log.xslt=${res.dir}/phpmd.xslt +phpmd.log.html=${phpmd.log.dir}/phpmd-output.htm +phpmd.msg=Executing PHP Mess Detector. The output is in the '${phpmd.log.dir}' directory. +phpmd.dir=${vendor.dir}/phpmd +phpmd.exec=${phpmd.dir}/phpmd/src/bin/phpmd +phpmd.args=${src.dir} xml cleancode,codesize,controversial,design,naming,unusedcode --reportfile ${phpmd.log.xml} + +# PHPUnit +phpunit.log.dir=${build.log.dir}/phpunit +phpunit.msg=Executing PHPUnit. The output is in the '${phpunit.log.dir}' directory. +phpunit.dir=${vendor.dir}/phpunit +phpunit.exec=${phpunit.dir}/phpunit/phpunit.php +phpunit.args=--configuration ${root}/phpunit.build.xml + +# PHPDocumentor +phpdoc.log.dir=${build.log.dir}/phpdoc +phpdoc.msg=Executing PHPDocumentor. The output is in the '${phpdoc.log.dir}' directory. +phpdoc.dir=${vendor.dir}/phpdocumentor +phpdoc.exec=${phpdoc.dir}/phpdocumentor/bin/phpdoc.php +phpdoc.args=-d ${src.dir} -t ${phpdoc.log.dir} + +# PHP Documentor + diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..cdbc88b --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +./vendor/phing/phing/bin/phing diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..0bad8fa --- /dev/null +++ b/build.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/composer.json b/composer.json index c7bc9eb..d299d6c 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "php": ">=5.4.9" }, "require-dev": { + "phing/phing": "2.6.*", "phpunit/phpunit": "3.7.*", "squizlabs/php_codesniffer": "1.5.*", "phpmd/phpmd" : "1.5.*", diff --git a/phpunit.build.xml b/phpunit.build.xml new file mode 100644 index 0000000..06a3eb3 --- /dev/null +++ b/phpunit.build.xml @@ -0,0 +1,36 @@ + + + + + res/tests + + + + res/tests/axelitus/Base + + + + + src/axelitus + + res/tests/axelitus/Base/Tests + + + + + + + + + + + + diff --git a/res/phpcs.xslt b/res/phpcs.xslt new file mode 100644 index 0000000..1dd8778 --- /dev/null +++ b/res/phpcs.xslt @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

CheckStyle Audit

Designed for use with CheckStyle and Ant.
+
+ + + +
+ + + +
+ + + + +
+ + + + +
+ + + + +

Files

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameErrorsWarningsInfos
+
+ + + + +

File

+ + + + + + + + + + + + + + + + +
SeverityError DescriptionLine
+ Back to top +
+ + + +

Summary

+ + + + + + + + + + + + + + + + + + +
FilesErrorsWarningsInfos
+
+ + + + a + b + + +
+ + diff --git a/res/phpmd.xslt b/res/phpmd.xslt new file mode 100644 index 0000000..8511ac3 --- /dev/null +++ b/res/phpmd.xslt @@ -0,0 +1,99 @@ + + + + + + + + + + +p1 +p2 +p3 +p4 +p5 + + + + - + + + + + + PMD <xsl:value-of select="//pmd/@version"/> Report + + + + +

PMD Report

+
+

Summary

+ + + + + + + + + + + + + + + + + + + +
FilesTotalPriority 1Priority 2Priority 3Priority 4Priority 5
+
+ + + + + + + + + + + + + + + + + +
PrioFileLineDescription
+
+

Generated by PMD on .

+ + +
+ +