-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
2,094 additions
and
1,708 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build | ||
vendor | ||
composer.lock |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ language: php | |
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
|
||
script: phpunit | ||
|
||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
project.basedir = . | ||
passthru = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project name="Query Auth" default="build"> | ||
|
||
<property file="build.properties" /> | ||
|
||
<fileset id="src-files" dir="${project.basedir}/src"> | ||
<include name="**/*.php" /> | ||
</fileset> | ||
|
||
<fileset id="test-files" dir="${project.basedir}/tests"> | ||
<include name="**/*.php" /> | ||
</fileset> | ||
|
||
<target name="clean" description="Clean build path"> | ||
<delete dir="${project.basedir}/build" /> | ||
<mkdir dir="${project.basedir}/build" /> | ||
<mkdir dir="${project.basedir}/build/api" /> | ||
<mkdir dir="${project.basedir}/build/cache" /> | ||
<mkdir dir="${project.basedir}/build/code-browser" /> | ||
<mkdir dir="${project.basedir}/build/coverage" /> | ||
<mkdir dir="${project.basedir}/build/logs" /> | ||
<mkdir dir="${project.basedir}/build/pdepend" /> | ||
</target> | ||
|
||
<target name="phplint" description="Running php lint check"> | ||
<phplint haltonfailure="true"> | ||
<fileset refid="src-files" /> | ||
<fileset refid="test-files" /> | ||
</phplint> | ||
</target> | ||
|
||
<target name="phpunit" description="Running unit tests"> | ||
<exec | ||
passthru="${passthru}" | ||
dir="${project.basedir}" | ||
command="phpunit | ||
--log-junit=${project.basedir}/build/logs/junit.xml | ||
--coverage-clover=${project.basedir}/build/logs/clover.xml | ||
--coverage-html=${project.basedir}/build/coverage" /> | ||
</target> | ||
|
||
<target name="phpunit-gen-report"> | ||
<phpunitreport | ||
infile="${project.basedir}/build/logs/junit.xml" | ||
format="frames" | ||
todir="${project.basedir}/build/logs" | ||
/> | ||
</target> | ||
|
||
<target name="phpdoc" description="Generate API documentation"> | ||
<exec | ||
passthru="${passthru}" | ||
command="phpdoc | ||
-d ${project.basedir}/src | ||
-t ${project.basedir}/build/api | ||
--defaultpackagename=QueryAuth | ||
--title='Query Auth' | ||
--force" /> | ||
</target> | ||
|
||
<target name="phpcs" description="Coding Standards Analysis"> | ||
<exec | ||
passthru="${passthru}" | ||
command="phpcs | ||
--report=checkstyle | ||
--report-file=${project.basedir}/build/logs/checkstyle.xml | ||
--standard=PSR2 | ||
--extensions=php | ||
${project.basedir}/src" /> | ||
</target> | ||
|
||
<target name="phpcpd" description="Copy/Paste detection"> | ||
<phpcpd> | ||
<fileset refid="src-files" /> | ||
<formatter | ||
type="pmd" | ||
outfile="${project.basedir}/build/logs/pmd-cpd.xml" /> | ||
</phpcpd> | ||
</target> | ||
|
||
<target name="phploc" description="Generate phploc.csv"> | ||
<phploc reportType="csv" reportName="phploc" reportDirectory="${project.basedir}/build/logs"> | ||
<fileset refid="src-files" /> | ||
</phploc> | ||
</target> | ||
|
||
<target name="phpcb" description="Source code browser"> | ||
<exec | ||
passthru="${passthru}" | ||
command="phpcb | ||
--log ${project.basedir}/build/logs | ||
--source ${project.basedir}/src | ||
--output ${project.basedir}/build/code-browser" /> | ||
</target> | ||
|
||
<target name="pdepend" description="Calculate dependencies"> | ||
<exec | ||
passthru="${passthru}" | ||
dir="${project.basedir}/src" | ||
command="pdepend | ||
--configuration=${project.basedir}/pdepend.xml | ||
--jdepend-chart=${project.basedir}/build/pdepend/dependencies.svg | ||
--jdepend-xml=${project.basedir}/build/logs/jdepend.xml | ||
--overview-pyramid=${project.basedir}/build/pdepend/overview-pyramid.svg | ||
--suffix=php | ||
--ignore=tests,vendor | ||
${project.basedir}" /> | ||
</target> | ||
|
||
<target name="phpmd" description="Mess detection"> | ||
<exec | ||
passthru="${passthru}" | ||
dir="${project.basedir}/src" | ||
command="phpmd ${project.basedir}/src xml cleancode,codesize,controversial,design,naming,unusedcode | ||
--suffixes .php | ||
--reportfile ${project.basedir}/build/logs/pmd.xml" /> | ||
</target> | ||
|
||
<target name="build" description="Build app"> | ||
<phingCall target="clean" /> | ||
<phingCall target="phplint" /> | ||
<phingCall target="phpdoc" /> | ||
<phingCall target="phpcs" /> | ||
<phingCall target="phpunit" /> | ||
<phingCall target="phpunit-gen-report" /> | ||
<phingCall target="phpcpd" /> | ||
<phingCall target="phpmd" /> | ||
<phingCall target="pdepend" /> | ||
<phingCall target="phploc" /> | ||
<phingCall target="phpcb" /> | ||
</target> | ||
</project> |
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
Oops, something went wrong.