Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
phpUnderControl 0.6.1
---------------------

- New setup command, which creates an unix init script for your phpUnderControl
installation. All features were supplied by proofek.

phpUnderControl 0.6.0
---------------------

Expand Down
6 changes: 3 additions & 3 deletions data/webapps/cruisecontrol/main.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@

<%-- phpUnderControl 8 --%>

<cruisecontrol:tab name="pmd" label="PHPMD">
<%@ include file="phpunit-pmd.jsp" %>
<cruisecontrol:tab name="phpmd" label="PHPMD">
<%@ include file="phpmd.jsp" %>
</cruisecontrol:tab>

<%-- phpUnderControl 9 --%>
<cruisecontrol:tab name="cpd" label="PHP-CPD">
<%@ include file="phpunit-cpd.jsp" %>
<%@ include file="php-cpd.jsp" %>
</cruisecontrol:tab>

<%-- phpUnderControl 10 --%>
Expand Down
4 changes: 2 additions & 2 deletions data/webapps/cruisecontrol/metrics.cewolf.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Displays the number of broken and successful builds
<jsp:useBean id="xpathData" class="net.sourceforge.cruisecontrol.chart.XPathChartData" />
<%
xpathData.add("PHP CodeSniffer", "count(/cruisecontrol/checkstyle/file/error)");
xpathData.add("PHPUnit PMD", "count(/cruisecontrol/pmd/file/violation)");
xpathData.add("PHPMD", "count(/cruisecontrol/pmd/file/violation)");
xpathData.add("PHPdoc", "count(/cruisecontrol/build//target[@name='php-documentor']/task[@name='exec']/message[contains(text(), 'WARNING in') or contains(text(), 'WARNING:') or contains(text(), 'ERROR in') or contains(text(), 'ERROR:')])");
%>
<cewolf:chart id="chart" title="Coding violations" type="timeseries" xaxislabel="date" yaxislabel="violations">
Expand All @@ -125,4 +125,4 @@ Displays the number of broken and successful builds
</cewolf:data>
<cewolf:chartpostprocessor id="xpathData" />
</cewolf:chart>
<cewolf:img chartid="chart" renderer="cewolf" width="450" height="280" style="display:inline;margin:0 15px 15px 15px;"/>
<cewolf:img chartid="chart" renderer="cewolf" width="450" height="280" style="display:inline;margin:0 15px 15px 15px;"/>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
<%@page errorPage="/error.jsp"%>
<%@ taglib uri="/WEB-INF/cruisecontrol-jsp11.tld" prefix="cruisecontrol"%>
<!--
CruiseControl's Style Sheet for PHPUnit CPD output
CruiseControl's Style Sheet for PHP-CPD's output
-->
<cruisecontrol:xsl xslFile="/xsl/phpunit-cpd-details.xsl"/>
<cruisecontrol:xsl xslFile="/xsl/php-cpd-details.xsl"/>
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
<%@page errorPage="/error.jsp"%>
<%@ taglib uri="/WEB-INF/cruisecontrol-jsp11.tld" prefix="cruisecontrol"%>
<!--
CruiseControl's Style Sheet for PHPUnit PMD output
CruiseControl's Style Sheet for PHPMD's output
-->
<cruisecontrol:xsl xslFile="/xsl/phpunit-pmd-details.xsl"/>
<cruisecontrol:xsl xslFile="/xsl/phpmd-details.xsl"/>
2 changes: 1 addition & 1 deletion data/webapps/cruisecontrol/xsl/buildresults.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href="maven.xsl"/>
<xsl:import href="phpunit-pmd.xsl"/>
<xsl:import href="phpmd.xsl"/>
<xsl:import href="errors.xsl"/>
<xsl:import href="phpdoc.xsl"/>
<xsl:import href="phpcs.xsl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<xsl:variable name="project" select="/cruisecontrol/info/property[@name='projectname']/@value"/>

<xsl:include href="./phpunit-pmd-summary.xsl" />
<xsl:include href="./phpmd-summary.xsl" />
<xsl:include href="./phphelper.xsl" />

<xsl:template match="/">
Expand All @@ -61,7 +61,7 @@
<xsl:template match="pmd">
<xsl:variable name="total.error.count" select="count(file/violation)" />

<h2>PHPUnit CPD</h2>
<h2>PHP-CPD</h2>

<xsl:apply-templates select="." mode="rule-summary"/>
<xsl:apply-templates select="//pmd-cpd/duplication" />
Expand Down Expand Up @@ -109,4 +109,4 @@
</table>

</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
<xsl:variable name="project" select="/cruisecontrol/info/property[@name='projectname']/@value"/>
<xsl:variable name="total.error.count" select="count(/cruisecontrol/pmd/file/violation)" />

<xsl:include href="./phpunit-pmd-summary.xsl" />
<xsl:include href="./phpunit-pmd-list.xsl" />
<xsl:include href="./phpmd-summary.xsl" />
<xsl:include href="./phpmd-list.xsl" />
<xsl:include href="./phphelper.xsl" />

<xsl:template match="/">
<h2>PHPUnit PMD</h2>
<h2>PHPMD</h2>
<xsl:apply-templates select="cruisecontrol/pmd" mode="rule-summary"/>
<xsl:apply-templates select="cruisecontrol/pmd" mode="phpunit-pmd-list"/>
<xsl:apply-templates select="cruisecontrol/pmd" mode="phpmd-list"/>

<table class="result" align="center">
<colgroup>
Expand All @@ -63,27 +63,35 @@
</colgroup>
<xsl:for-each select="/cruisecontrol/pmd/file[violation]">
<xsl:sort data-type="number" order="descending" select="count(violation)"/>
<xsl:apply-templates select="." mode="pmd-file"/>
<xsl:apply-templates select="." mode="pmd-file">
<xsl:with-param name="position" select="position()" />
</xsl:apply-templates>
</xsl:for-each>
</table>
</xsl:template>

<xsl:template match="file" mode="pmd-file">
<xsl:param name="position" />

<xsl:variable name="javaclass">
<xsl:call-template name="phpname">
<xsl:with-param name="filename" select="@name"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="filename" select="translate(@name,'\','/')"/>
<thead>
<tr><td colspan="3"><br/></td></tr>
<tr>
<td colspan="3">
<br />
</td>
</tr>
<tr>
<th colspan="3">
<xsl:value-of select="$javaclass"/>
(<xsl:value-of select="count(violation)"/>)
</th>
<th>
Priority
Priority <a name="a{$position}"></a>
</th>
</tr>
</thead>
Expand Down Expand Up @@ -160,4 +168,4 @@
</xsl:template>


</xsl:stylesheet>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<xsl:variable name="currentlog"
select="substring(cruisecontrol/info/property[@name='logfile']/@value, 0, string-length(cruisecontrol/info/property[@name='logfile']/@value) - 3)" />

<xsl:template match="pmd" mode="phpunit-pmd-list">
<xsl:template match="pmd" mode="phpmd-list">
<p/>
<table class="result">
<colgroup>
Expand All @@ -52,13 +52,13 @@
</colgroup>
<thead>
<tr>
<th colspan="2">PHPUnit PMD Violations in Files</th>
<th colspan="2">PHPMD Violations in Files</th>
<th>Errors / Warnings</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="/cruisecontrol/pmd/file[violation]">
<xsl:sort select="@name" />
<xsl:sort data-type="number" order="descending" select="count(violation)"/>
<xsl:variable name="errors" select="/cruisecontrol/pmd/file[@name=current()/@name]/violation"/>
<xsl:variable name="errorCount" select="count($errors)"/>
<tr>
Expand Down Expand Up @@ -99,4 +99,4 @@
</tfoot>
</table>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</colgroup>
<thead>
<tr>
<th colspan="2">PHPUnit PMD rule</th>
<th colspan="2">PHPMD rule</th>
<th>Files</th>
<th>Errors / Warnings</th>
</tr>
Expand All @@ -73,7 +73,7 @@
<xsl:value-of select="@ruleset"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>PHPUnit PMD</xsl:text>
<xsl:text>PHPMD</xsl:text>
</xsl:otherwise>
</xsl:choose> / <xsl:value-of select="@rule"/></td>
<td align="right"><xsl:value-of select="$fileCount"/></td>
Expand All @@ -88,7 +88,7 @@
<xsl:attribute name="class">oddrow</xsl:attribute>
</xsl:if>
<td></td>
<td>PHPUnit CPD / CopyPasteDetection</td>
<td>PHP-CPD / CopyPasteDetection</td>
<td align="right"><xsl:value-of select="$duplication.file.count" /></td>
<td align="right"><xsl:value-of select="$duplication.count" /></td>
</tr>
Expand All @@ -104,4 +104,4 @@
</table>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>

<xsl:include href="./phpunit-pmd-summary.xsl" />
<xsl:include href="./phpmd-summary.xsl" />

<xsl:param name="pmd.warning.threshold" select="11"/>

Expand Down
14 changes: 7 additions & 7 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1608,12 +1608,12 @@ example project.
<file name="phpcs.xsl" role="data"/>
<file name="phpdoc.xsl" role="data"/>
<file name="phphelper.xsl" role="data"/>
<file name="phpunit-cpd-details.xsl" role="data"/>
<file name="php-cpd-details.xsl" role="data"/>
<file name="phpunit-details.xsl" role="data"/>
<file name="phpunit-pmd-details.xsl" role="data"/>
<file name="phpunit-pmd-list.xsl" role="data"/>
<file name="phpunit-pmd-summary.xsl" role="data"/>
<file name="phpunit-pmd.xsl" role="data"/>
<file name="phpmd-details.xsl" role="data"/>
<file name="phpmd-list.xsl" role="data"/>
<file name="phpmd-summary.xsl" role="data"/>
<file name="phpmd.xsl" role="data"/>
<file name="phpunit.xsl" role="data"/>
</dir>
<dir name="WEB-INF/lib">
Expand Down Expand Up @@ -1656,10 +1656,10 @@ example project.
<file name="phpcs.jsp" role="data">
<tasks:replace from="- SVN" to="version" type="package-info"/>
</file>
<file name="phpunit-cpd.jsp" role="data">
<file name="php-cpd.jsp" role="data">
<tasks:replace from="- SVN" to="version" type="package-info"/>
</file>
<file name="phpunit-pmd.jsp" role="data">
<file name="phpmd.jsp" role="data">
<tasks:replace from="- SVN" to="version" type="package-info"/>
</file>
<file name="phpunit.jsp" role="data">
Expand Down
14 changes: 7 additions & 7 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class phpucInstallCommand extends phpucAbstractCommand implements phpucConsoleCo
'/webapps/cruisecontrol/metrics.cewolf.jsp',
'/webapps/cruisecontrol/phpcs.jsp',
'/webapps/cruisecontrol/phpunit.jsp',
'/webapps/cruisecontrol/phpunit-pmd.jsp',
'/webapps/cruisecontrol/phpunit-cpd.jsp',
'/webapps/cruisecontrol/phpmd.jsp',
'/webapps/cruisecontrol/php-cpd.jsp',
'/webapps/cruisecontrol/servertime.jsp',
'/webapps/cruisecontrol/css/php-under-control.css',
'/webapps/cruisecontrol/css/SyntaxHighlighter.css',
Expand Down Expand Up @@ -113,12 +113,12 @@ class phpucInstallCommand extends phpucAbstractCommand implements phpucConsoleCo
'/webapps/cruisecontrol/xsl/phpdoc.xsl',
'/webapps/cruisecontrol/xsl/phphelper.xsl',
'/webapps/cruisecontrol/xsl/phpunit.xsl',
'/webapps/cruisecontrol/xsl/phpunit-cpd-details.xsl',
'/webapps/cruisecontrol/xsl/php-cpd-details.xsl',
'/webapps/cruisecontrol/xsl/phpunit-details.xsl',
'/webapps/cruisecontrol/xsl/phpunit-pmd.xsl',
'/webapps/cruisecontrol/xsl/phpunit-pmd-details.xsl',
'/webapps/cruisecontrol/xsl/phpunit-pmd-list.xsl',
'/webapps/cruisecontrol/xsl/phpunit-pmd-summary.xsl',
'/webapps/cruisecontrol/xsl/phpmd.xsl',
'/webapps/cruisecontrol/xsl/phpmd-details.xsl',
'/webapps/cruisecontrol/xsl/phpmd-list.xsl',
'/webapps/cruisecontrol/xsl/phpmd-summary.xsl',
'/webapps/cruisecontrol/WEB-INF/lib/php-under-control.jar',
);

Expand Down
1 change: 1 addition & 0 deletions src/Console/ConsoleInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ private function tokenizeHelp( $help )
* @param array(string=>mixed) $option2 Compare option two.
*
* @return integer
* @SuppressWarnings(PHPMD.UnusedPrivateMethod)
*/
private function sortCommandOptions( $option1, $option2 )
{
Expand Down
Loading