Skip to content
This repository has been archived by the owner on Apr 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #57 from jawira/improve-ordering
Browse files Browse the repository at this point in the history
Improve ordering
  • Loading branch information
jawira authored Feb 19, 2020
2 parents e46d426 + d043ec5 commit 4be9363
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 40 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Phing visualizer
[![PDS Skeleton](https://img.shields.io/badge/pds-skeleton-blue.svg)](https://github.com/php-pds/skeleton)
[![License](https://poser.pugx.org/jawira/phing-visualizer/license)](https://packagist.org/packages/jawira/phing-visualizer)
[![Issues](https://img.shields.io/github/issues/jawira/phing-visualizer.svg?label=HuBoard&color=694DC2)](https://huboard.com/jawira/phing-visualizer)
[![HitCount](http://hits.dwyl.io/jawira/phing-visualizer.svg)](http://hits.dwyl.io/jawira/phing-visualizer)

With **phing-visualizer** You can go from this:

Expand Down
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<target name="phive:install" description="Install PHPStan">
<exec executable="phive" checkreturn="true" passthru="true">
<arg value="install"/>
<!--<arg value="&#45;&#45;trust-gpg-keys"/>-->
<!--<arg value="4AA394086372C20A,8E730BA25823D8B5,2420BAE0A3BE25C6,4AA394086372C20A"/>-->
<arg value="--trust-gpg-keys"/>
<arg value="4AA394086372C20A,8E730BA25823D8B5,2420BAE0A3BE25C6,4AA394086372C20A"/>
</exec>
</target>

Expand Down
16 changes: 8 additions & 8 deletions resources/puml/dummy.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ skinparam UseCaseBorderColor #333333
skinparam UseCaseBorderThickness 2
skinparam UseCaseFontColor Black

(init)-[#5D9CEC]->(composer) : depend:1
(tests)-[#5D9CEC]->(composer) : depend:1
(tests)-[#EC87C0]->(phpunit) : call:1
(tests)-[#EC87C0]->(behat) : call:2
(notifying)-[#5D9CEC]->(composer) : depend:1
(notifying)-[#EC87C0]->(emailing) : call:1
(notifying)-[#EC87C0]->(irc) : call:2

(init)
(composer)
(tests)
Expand All @@ -16,12 +24,4 @@ skinparam UseCaseFontColor Black
(phpunit)
(behat)

(init)-[#5D9CEC]->(composer) : depend:1
(tests)-[#EC87C0]->(phpunit) : call:1
(tests)-[#EC87C0]->(behat) : call:2
(tests)-[#5D9CEC]->(composer) : depend:1
(notifying)-[#EC87C0]->(emailing) : call:1
(notifying)-[#EC87C0]->(irc) : call:2
(notifying)-[#5D9CEC]->(composer) : depend:1

@enduml
22 changes: 11 additions & 11 deletions resources/puml/gist-alphabraga.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ skinparam UseCaseBorderColor #333333
skinparam UseCaseBorderThickness 2
skinparam UseCaseFontColor Black

(build)-[#EC87C0]->(start) : call:1
(build)-[#EC87C0]->(clean) : call:2
(build)-[#EC87C0]->(structure) : call:3
(build)-[#EC87C0]->(composer) : call:4
(build)-[#EC87C0]->(phpunit) : call:5
(build)-[#EC87C0]->(metrics) : call:6
(build)-[#EC87C0]->(phpdoc) : call:7
(build)-[#EC87C0]->(copylogs) : call:8
(build)-[#EC87C0]->(makedist) : call:9
(build)-[#EC87C0]->(deploy) : call:10

(build)
(start)
(clean)
Expand All @@ -19,15 +30,4 @@ skinparam UseCaseFontColor Black
(copylogs)
(deploy)

(build)-[#EC87C0]->(start) : call:1
(build)-[#EC87C0]->(clean) : call:2
(build)-[#EC87C0]->(structure) : call:3
(build)-[#EC87C0]->(composer) : call:4
(build)-[#EC87C0]->(phpunit) : call:5
(build)-[#EC87C0]->(metrics) : call:6
(build)-[#EC87C0]->(phpdoc) : call:7
(build)-[#EC87C0]->(copylogs) : call:8
(build)-[#EC87C0]->(makedist) : call:9
(build)-[#EC87C0]->(deploy) : call:10

@enduml
4 changes: 2 additions & 2 deletions resources/puml/gist-kbariotis.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ skinparam UseCaseBorderColor #333333
skinparam UseCaseBorderThickness 2
skinparam UseCaseFontColor Black

(build)-[#5D9CEC]->(test) : depend:1

(welcome)
(test)
(build)

(build)-[#5D9CEC]->(test) : depend:1

@enduml
10 changes: 5 additions & 5 deletions resources/puml/gist-mapserver2007.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ skinparam UseCaseBorderColor #333333
skinparam UseCaseBorderThickness 2
skinparam UseCaseFontColor Black

(main)-[#5D9CEC]->(init) : depend:1
(main)-[#5D9CEC]->(phpmd) : depend:2
(main)-[#5D9CEC]->(phpcpd) : depend:3
(main)-[#5D9CEC]->(test) : depend:4

(main)
(init)
(test)
(phpmd)
(phpcpd)

(main)-[#5D9CEC]->(init) : depend:1
(main)-[#5D9CEC]->(phpmd) : depend:2
(main)-[#5D9CEC]->(phpcpd) : depend:3
(main)-[#5D9CEC]->(test) : depend:4

@enduml
2 changes: 1 addition & 1 deletion resources/puml/gist-nfabre.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ skinparam UseCaseBorderColor #333333
skinparam UseCaseBorderThickness 2
skinparam UseCaseFontColor Black

(work)

(work)

@enduml
6 changes: 3 additions & 3 deletions resources/puml/phing-doc.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ skinparam UseCaseBorderColor #333333
skinparam UseCaseBorderThickness 2
skinparam UseCaseFontColor Black

(build)-[#5D9CEC]->(prepare) : depend:1
(dist)-[#5D9CEC]->(build) : depend:1

(prepare)
(build)
(dist)

(build)-[#5D9CEC]->(prepare) : depend:1
(dist)-[#5D9CEC]->(build) : depend:1

@enduml
16 changes: 9 additions & 7 deletions resources/xslt/calls.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@
extension-element-prefixes="str">
<xsl:output method="text" version="2.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/project">
<!--Printing dependencies and calls-->


<!--Printing dependencies and calls-->
<xsl:for-each select="./target">
<xsl:if test="@depends">
<xsl:call-template name="print-depends">
<xsl:with-param name="from" select="@name"/>
<xsl:with-param name="depends" select="@depends"/>
</xsl:call-template>
</xsl:if>
<xsl:variable name="current-target" select="@name"/>
<xsl:for-each select=".//phingcall | .//foreach | .//runtarget">
<xsl:text>(</xsl:text>
Expand All @@ -20,12 +28,6 @@
<xsl:value-of select="position()"/>
<xsl:text>&#10;</xsl:text>
</xsl:for-each>
<xsl:if test="@depends">
<xsl:call-template name="print-depends">
<xsl:with-param name="from" select="@name"/>
<xsl:with-param name="depends" select="@depends"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:template>

Expand Down
2 changes: 1 addition & 1 deletion src/Diagram.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected function generatePuml(): string
{
$puml = '';

foreach ([self::XSL_HEADER, self::XSL_TARGETS, self::XSL_CALLS, self::XSL_FOOTER] as $xslFile) {
foreach ([self::XSL_HEADER, self::XSL_CALLS, self::XSL_TARGETS, self::XSL_FOOTER] as $xslFile) {
$puml .= $this->transformToPuml($xslFile);
}

Expand Down

0 comments on commit 4be9363

Please sign in to comment.