-
Notifications
You must be signed in to change notification settings - Fork 38
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
16 changed files
with
312 additions
and
178 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
require_once './vendor/autoload.php'; | ||
|
||
$finder = \Symfony\CS\Finder\DefaultFinder::create() | ||
->in('src/'); | ||
|
||
return \Symfony\CS\Config\Config::create() | ||
->setUsingCache(true) | ||
->fixers([ | ||
'-concat_without_spaces', | ||
'concat_with_spaces', | ||
'ordered_use', | ||
]) | ||
->finder($finder); |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ php: | |
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
|
||
before_script: | ||
- composer self-update | ||
|
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,90 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project name="Slim Auth" default="build"> | ||
|
||
<property file="build.properties" /> | ||
|
||
<fileset id="src" dir="${project.basedir}/src"> | ||
<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/docs" /> | ||
<mkdir dir="${project.basedir}/build/cache" /> | ||
<mkdir dir="${project.basedir}/build/coverage" /> | ||
<mkdir dir="${project.basedir}/build/logs" /> | ||
</target> | ||
|
||
<target name="phplint" description="Running php lint check"> | ||
<phplint haltonfailure="true"> | ||
<fileset refid="src" /> | ||
</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="php-cs-fixer" description="Fix CS violations"> | ||
<exec | ||
passthru="${passthru}" | ||
dir="${project.basedir}" | ||
command="php-cs-fixer fix --verbose" /> | ||
</target> | ||
|
||
<target name="phpdoc" description="Generate API documentation"> | ||
<exec passthru="${passthru}" command="phpdoc --force" /> | ||
</target> | ||
|
||
<target name="phpunit-gen-report"> | ||
<phpunitreport | ||
infile="${project.basedir}/build/logs/junit.xml" | ||
format="frames" | ||
todir="${project.basedir}/build/logs" | ||
/> | ||
</target> | ||
|
||
<target name="phpcpd" description="Copy/Paste detection"> | ||
<phpcpd> | ||
<fileset refid="src" /> | ||
<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" /> | ||
</phploc> | ||
</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="php-cs-fixer" /> | ||
<phingCall target="phpunit" /> | ||
<phingCall target="phpunit-gen-report" /> | ||
<phingCall target="phpcpd" /> | ||
<phingCall target="phpmd" /> | ||
<phingCall target="phploc" /> | ||
<phingCall target="phpdoc" /> | ||
</target> | ||
</project> |
Oops, something went wrong.