Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 444fb8a

Browse files
committedMar 1, 2024··
Docs: improve code examples for Squiz.WhiteSpace.ScopeClosingBrace
- Combine too little with too much whitespace - Adjust emphasis on example containing PHP tags - Change example paragraph to span for better HTML formatting
1 parent ebf4a48 commit 444fb8a

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed
 

‎src/Standards/Squiz/Docs/WhiteSpace/ScopeClosingBraceStandard.xml

+6-14
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@ function foo()
1111
{
1212
<em>}</em>
1313
14-
function bar()
15-
{
16-
<em> }</em>
17-
1814
if (!class_exists('Foo')) {
1915
class Foo {
2016
<em>}</em>
2117
<em>}</em>
2218
2319
<?php if ($something) { ?>
24-
<p>some output</p>
25-
<em></em><?php } ?>
20+
<span>some output</span>
21+
<em><?php }</em> ?>
2622
]]>
2723
</code>
2824
<code title="Invalid: Closing brace misaligned with line containing opening brace.">
@@ -31,18 +27,14 @@ function foo()
3127
{
3228
<em> }</em>
3329
34-
function bar()
35-
{
36-
<em> }</em>
37-
3830
if (!class_exists('Foo')) {
3931
class Foo {
40-
<em> }</em>
41-
<em> }</em>
32+
<em>}</em>
33+
<em> }</em>
4234
4335
<?php if ($something) { ?>
44-
<p>some output</p>
45-
<em> </em><?php } ?>
36+
<span>some output</span>
37+
<em> <?php }</em> ?>
4638
]]>
4739
</code>
4840
</code_comparison>

0 commit comments

Comments
 (0)
Please sign in to comment.