Skip to content

Commit

Permalink
Merge pull request #3 from polderknowledge/feature/formatting
Browse files Browse the repository at this point in the history
Fixed the formatting of the documents
  • Loading branch information
waltertamboer authored May 30, 2018
2 parents 21ddef4 + 89d95a6 commit f0e7238
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 99 deletions.
Empty file modified bin/pk-init-build.php
100755 → 100644
Empty file.
110 changes: 55 additions & 55 deletions common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<!-- commons setup -->
<!-- ============================================ -->
<php function="dirname" returnProperty="phing.commons.root" level="debug">
<param value="${phing.file.common}" />
<param value="${phing.file.common}"/>
</php>

<!-- ============================================ -->
<!-- project properties -->
<!-- ============================================ -->
<php function="dirname" returnProperty="project.root" level="debug">
<param value="${phing.file}" />
<param value="${phing.file}"/>
</php>

<resolvepath propertyName="project.root" file="${project.root}" />
<resolvepath propertyName="project.root" file="${project.root}"/>

<!-- ============================================ -->
<!-- fileset definition -->
Expand All @@ -27,104 +27,104 @@
<include name="tests/**/*.php"/>
</fileset>

<property name="validation.fileset" value="all" override="true" />
<property name="validation.fileset" value="all" override="true"/>

<!-- ============================================ -->
<!-- directory settings -->
<!-- ============================================ -->
<property name="project.vendor" value="${project.root}/vendor" override="true" />
<property name="project.bin" value="${project.root}/vendor/bin" override="true" />
<property name="project.src" value="${project.root}/src" override="true" />
<property name="project.test" value="${project.root}/tests" override="true" />
<property name="project.build" value="${project.root}/build" override="true" />
<property name="project.phpdoc" value="${project.build}/phpdoc" override="true" />
<property name="project.testreport" value="${project.build}/testreport" override="true" />
<property name="project.coverage" value="${project.build}/coverage" override="true" />
<property name="project.vendor" value="${project.root}/vendor" override="true"/>
<property name="project.bin" value="${project.root}/vendor/bin" override="true"/>
<property name="project.src" value="${project.root}/src" override="true"/>
<property name="project.test" value="${project.root}/tests" override="true"/>
<property name="project.build" value="${project.root}/build" override="true"/>
<property name="project.phpdoc" value="${project.build}/phpdoc" override="true"/>
<property name="project.testreport" value="${project.build}/testreport" override="true"/>
<property name="project.coverage" value="${project.build}/coverage" override="true"/>

<property file="${phing.commons.root}/build.properties.dist" override="true" />
<property file="${phing.commons.root}/build.properties.dist" override="true"/>

<if>
<available file="${project.root}/build.properties" />
<available file="${project.root}/build.properties"/>
<then>
<property file="${project.root}/build.properties" override="true" />
<property file="${project.root}/build.properties" override="true"/>
</then>
</if>

<if>
<available file="${project.root}/build.properties.local" />
<available file="${project.root}/build.properties.local"/>
<then>
<property file="${project.root}/build.properties.local" />
<property file="${project.root}/build.properties.local"/>
</then>
</if>

<import file="${project.vendor}/bitexpert/phing-securitychecker/build.xml" />
<import file="${phing.commons.root}/targets/test/phpunit.xml" />
<import file="${phing.commons.root}/targets/phpmd/phpmd.xml" />
<import file="${phing.commons.root}/targets/phpcpd/phpcpd.xml" />
<import file="${phing.commons.root}/targets/phploc/phploc.xml" />
<import file="${phing.commons.root}/targets/test/checksyntax.xml" />
<import file="${phing.commons.root}/targets/codestyle/checkstyle.xml" />
<import file="${phing.commons.root}/targets/phpdoc/phpdoc.xml" />
<import file="${project.vendor}/bitexpert/phing-securitychecker/build.xml"/>
<import file="${phing.commons.root}/targets/test/phpunit.xml"/>
<import file="${phing.commons.root}/targets/phpmd/phpmd.xml"/>
<import file="${phing.commons.root}/targets/phpcpd/phpcpd.xml"/>
<import file="${phing.commons.root}/targets/phploc/phploc.xml"/>
<import file="${phing.commons.root}/targets/test/checksyntax.xml"/>
<import file="${phing.commons.root}/targets/codestyle/checkstyle.xml"/>
<import file="${phing.commons.root}/targets/phpdoc/phpdoc.xml"/>

<target name="clean" description="cleans the workspace">
<delete dir="${project.build}" includeemptydirs="true" failonerror="false" />
<delete dir="${project.build}" includeemptydirs="true" failonerror="false"/>
</target>

<target name="prepare" description="prepares build directory with required folders">
<mkdir dir="${project.build}" />
<mkdir dir="${project.build}"/>

<mkdir dir="${project.phpdoc}" />
<mkdir dir="${project.phpdoc}"/>
</target>

<target name="test" depends="clean, prepare" description="run all tests">
<phingcall target="test.checksyntax" />
<phingcall target="test.phpunit" />
<phingcall target="test.checksyntax"/>
<phingcall target="test.phpunit"/>
</target>

<target name="checkstyle" depends="clean, prepare" description="run a style check">
<phingcall target="codestyle.checkstyle" />
<phingcall target="codestyle.checkstyle"/>
</target>

<target name="build" description="run full build chain">
<phingcall target="clean" />
<phingcall target="prepare" />
<phingcall target="test.checksyntax" />
<phingcall target="test.phpunit" />
<phingcall target="codestyle.checkstyle" />
<phingcall target="clean"/>
<phingcall target="prepare"/>
<phingcall target="test.checksyntax"/>
<phingcall target="test.phpunit"/>
<phingcall target="codestyle.checkstyle"/>
</target>

<target name="build-ci" description="run full build chain including reports">
<phingcall target="clean" />
<phingcall target="prepare" />
<phingcall target="test.checksyntax" />
<phingcall target="test.phpunit" />
<phingcall target="codestyle.checkstyle" />
<phingcall target="phpcpd" />
<phingcall target="phploc" />
<phingcall target="phpmd" />
<phingcall target="clean"/>
<phingcall target="prepare"/>
<phingcall target="test.checksyntax"/>
<phingcall target="test.phpunit"/>
<phingcall target="codestyle.checkstyle"/>
<phingcall target="phpcpd"/>
<phingcall target="phploc"/>
<phingcall target="phpmd"/>
</target>

<target name="security-check">
<if>
<equals arg1="${security-check.enabled}" arg2="true"/>
<then>
<securitychecker lockfile="composer.lock" />
<securitychecker lockfile="composer.lock"/>
</then>
<else>
<echo level="warning" message="skipping because target is disabled."/>
</else>
</if>
</target>

<target name="compatibility:check" description="check the php compatiblity ">
<phpcodesniffer
standard="vendor/wimg/php-compatibility/PHPCompatibility"
format="summary" skipversioncheck="true"
showSniffs="true" showWarnings="true"
haltonerror="true">
<fileset refid="phpcompat"/>
<formatter type="full" usefile="false"/>
<formatter type="checkstyle" outfile="${project.build}/checkstyle-codesniffer.xml"/>
</phpcodesniffer>
<phpcodesniffer
standard="vendor/wimg/php-compatibility/PHPCompatibility"
format="summary" skipversioncheck="true"
showSniffs="true" showWarnings="true"
haltonerror="true">
<fileset refid="phpcompat"/>
<formatter type="full" usefile="false"/>
<formatter type="checkstyle" outfile="${project.build}/checkstyle-codesniffer.xml"/>
</phpcodesniffer>
</target>
</project>
2 changes: 1 addition & 1 deletion targets/phpcpd/phpcpd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
</else>
</if>
</target>
</project>
</project>
2 changes: 1 addition & 1 deletion targets/phpdoc/phpdoc.dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
<translator>
<locale>en</locale>
</translator>
</phpdocumentor>
</phpdocumentor>
10 changes: 5 additions & 5 deletions targets/phpdoc/phpdoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
<equals arg1="${phpdoc.enabled}" arg2="true"/>
<then>
<if>
<available file="${project.root}/phpdoc.xml" />
<available file="${project.root}/phpdoc.xml"/>
<then>
<property name="phpdoc.config" value="${project.root}/phpdoc.xml" />
<property name="phpdoc.config" value="${project.root}/phpdoc.xml"/>
</then>

<elseif>
<available file="${project.root}/phpdoc.dist.xml" />
<available file="${project.root}/phpdoc.dist.xml"/>
<then>
<property name="phpdoc.config" value="${project.root}/phpdoc.dist.xml" />
<property name="phpdoc.config" value="${project.root}/phpdoc.dist.xml"/>
</then>
</elseif>
<else>
<property name="phpdoc.config" value="${phing.commons.root}/targets/phpdoc/phpdoc.dist.xml" />
<property name="phpdoc.config" value="${phing.commons.root}/targets/phpdoc/phpdoc.dist.xml"/>
</else>
</if>
<exec command="phpdoc -d ${project.src} -t ${project.build} -c ${phpdoc.config}"
Expand Down
2 changes: 1 addition & 1 deletion targets/phploc/phploc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
</else>
</if>
</target>
</project>
</project>
2 changes: 1 addition & 1 deletion targets/phpmd/phpmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
</else>
</if>
</target>
</project>
</project>
68 changes: 34 additions & 34 deletions targets/phpmd/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,45 @@
xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Default rules for polderknowledge projects</description>

<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />
<rule ref="rulesets/cleancode.xml/ElseExpression" />
<rule ref="rulesets/cleancode.xml/StaticAccess" />
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag"/>
<rule ref="rulesets/cleancode.xml/ElseExpression"/>
<rule ref="rulesets/cleancode.xml/StaticAccess"/>

<rule ref="rulesets/codesize.xml/CyclomaticComplexity" />
<rule ref="rulesets/codesize.xml/NPathComplexity" />
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength" />
<rule ref="rulesets/codesize.xml/ExcessiveClassLength" />
<rule ref="rulesets/codesize.xml/ExcessiveParameterList" />
<rule ref="rulesets/codesize.xml/ExcessivePublicCount" />
<rule ref="rulesets/codesize.xml/TooManyFields" />
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>
<rule ref="rulesets/codesize.xml/NPathComplexity"/>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>
<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>
<rule ref="rulesets/codesize.xml/TooManyFields"/>
<rule ref="rulesets/codesize.xml/TooManyMethods">
<priority>5</priority>
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity" />
<rule ref="rulesets/controversial.xml/Superglobals" />
<rule ref="rulesets/controversial.xml/CamelCaseClassName" />
<rule ref="rulesets/controversial.xml/CamelCasePropertyName" />
<rule ref="rulesets/controversial.xml/CamelCaseMethodName" />
<rule ref="rulesets/controversial.xml/CamelCaseParameterName" />
<rule ref="rulesets/controversial.xml/CamelCaseVariableName" />
<rule ref="rulesets/design.xml/ExitExpression" />
<rule ref="rulesets/design.xml/EvalExpression" />
<rule ref="rulesets/design.xml/GotoStatement" />
<rule ref="rulesets/design.xml/NumberOfChildren" />
<rule ref="rulesets/design.xml/DepthOfInheritance" />
<rule ref="rulesets/design.xml/CouplingBetweenObjects" />
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"/>
<rule ref="rulesets/controversial.xml/Superglobals"/>
<rule ref="rulesets/controversial.xml/CamelCaseClassName"/>
<rule ref="rulesets/controversial.xml/CamelCasePropertyName"/>
<rule ref="rulesets/controversial.xml/CamelCaseMethodName"/>
<rule ref="rulesets/controversial.xml/CamelCaseParameterName"/>
<rule ref="rulesets/controversial.xml/CamelCaseVariableName"/>
<rule ref="rulesets/design.xml/ExitExpression"/>
<rule ref="rulesets/design.xml/EvalExpression"/>
<rule ref="rulesets/design.xml/GotoStatement"/>
<rule ref="rulesets/design.xml/NumberOfChildren"/>
<rule ref="rulesets/design.xml/DepthOfInheritance"/>
<rule ref="rulesets/design.xml/CouplingBetweenObjects"/>
<rule ref="rulesets/naming.xml/ShortVariable">
<properties>
<property name="minimum" value="2" />
<property name="minimum" value="2"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml/LongVariable" />
<rule ref="rulesets/naming.xml/ShortMethodName" />
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass" />
<rule ref="rulesets/naming.xml/ConstantNamingConventions" />
<rule ref="rulesets/naming.xml/BooleanGetMethodName" />
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField" />
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable" />
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod" />
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter" />
</ruleset>
<rule ref="rulesets/naming.xml/LongVariable"/>
<rule ref="rulesets/naming.xml/ShortMethodName"/>
<rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass"/>
<rule ref="rulesets/naming.xml/ConstantNamingConventions"/>
<rule ref="rulesets/naming.xml/BooleanGetMethodName"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateField"/>
<rule ref="rulesets/unusedcode.xml/UnusedLocalVariable"/>
<rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod"/>
<rule ref="rulesets/unusedcode.xml/UnusedFormalParameter"/>
</ruleset>
2 changes: 1 addition & 1 deletion targets/test/checksyntax.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<fileset refid="${validation.fileset}"/>
</phplint>
</target>
</project>
</project>

0 comments on commit f0e7238

Please sign in to comment.