Skip to content

Commit aacf757

Browse files
authored
Merge pull request #23 from tertek/add-psalm-doc-links
Add psalm doc links
2 parents 64b3d14 + c7c8a8e commit aacf757

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

psalm-html-output.xsl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ Psalm XML to HTML renderer
5454
ul#psalmErrors li.hidden {
5555
display: none;
5656
}
57+
a, a:visited {
58+
color: #943b3a;
59+
}
5760
</style>
5861
</head>
5962
<body>
@@ -172,6 +175,7 @@ Psalm XML to HTML renderer
172175
<pre data-start='{line_from}' class="line-numbersx">
173176
<code class="language-php"><xsl:value-of select="substring(snippet, 0, from - snippet_from + 1)" />/**##(##**/<xsl:value-of select="substring(snippet, from - snippet_from + 1, to - from)" />/**##)##**/<xsl:value-of select="substring(snippet, to - snippet_from + 1)" /></code>
174177
</pre>
178+
<small><a target="_blank" href="{link}">Psalm #<xsl:value-of select="shortcode"/></a></small>
175179
</li>
176180
</xsl:template>
177181
</xsl:stylesheet>

test/psalm-report.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
ul#psalmErrors li.hidden {
4545
display: none;
4646
}
47+
a, a:visited {
48+
color: #943b3a;
49+
}
4750
</style>
4851
</head>
4952
<body>
@@ -57,6 +60,7 @@ <h3>tests/src/SomeTest.php:94</h3>
5760
</ul>
5861
<p>Cannot access array value on mixed variable $transaction</p>
5962
<pre data-start="94" class="line-numbersx"><code class="language-php"> $this-&gt;assertSame('http://example.com/EchoTest', (string) /**##(##**/$transaction['request']/**##)##**/-&gt;getUri());</code></pre>
63+
<small><a target="_blank" href="https://psalm.dev/051">Psalm #51</a></small>
6064
</li>
6165
<li data-severity="error" data-psalm-type="InvalidScalarArgument">
6266
<h3>src/Reflector/Exception/IdentifierNotFound.php:18</h3>
@@ -66,6 +70,7 @@ <h3>src/Reflector/Exception/IdentifierNotFound.php:18</h3>
6670
</ul>
6771
<p>Argument 1 of __construct expects string, int provided</p>
6872
<pre data-start="18" class="line-numbersx"><code class="language-php"> parent::__construct(/**##(##**/$message/**##)##**/);</code></pre>
73+
<small><a target="_blank" href="https://psalm.dev/051">Psalm #51</a></small>
6974
</li>
7075
<li data-severity="error" data-psalm-type="InvalidScalarArgument">
7176
<h3>src/Reflector/Exception/IdentifierNotFound.php:30</h3>
@@ -79,6 +84,7 @@ <h3>src/Reflector/Exception/IdentifierNotFound.php:30</h3>
7984
$identifier-&gt;getType()-&gt;getName(),
8085
$identifier-&gt;getName()
8186
/**##)##**/ ), $identifier);</code></pre>
87+
<small><a target="_blank" href="https://psalm.dev/051">Psalm #51</a></small>
8288
</li>
8389
</ul>
8490
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/prism.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/components/prism-markup-templating.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/components/prism-php.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.16.0/plugins/line-numbers/prism-line-numbers.min.js"></script><script type="text/javascript">

0 commit comments

Comments
 (0)