File tree 1 file changed +9
-19
lines changed
src/Standards/Squiz/Docs/WhiteSpace
1 file changed +9
-19
lines changed Original file line number Diff line number Diff line change 5
5
]]>
6
6
</standard >
7
7
<code_comparison >
8
- <code title =" Valid: Closing brace aligned with opening brace." >
8
+ <code title =" Valid: Closing brace aligned with line containing opening brace." >
9
9
<![CDATA[
10
10
function foo()
11
11
{
12
12
echo 'opening brace at column 1';
13
13
echo 'closing brace at column 1';
14
14
<em>}</em>
15
15
16
- class Foo {
17
- echo 'class keyword starts at column 1';
18
- echo 'closing brace at column 1';
19
- <em>}</em>
20
-
21
- if ($a > $b) {
22
- echo 'conditional starts at column 1';
23
- echo 'closing brace at column 1';
16
+ if (!class_exists('Foo')) {
17
+ class Foo {
18
+ <em>}</em>
24
19
<em>}</em>
25
20
26
21
<?php if ($something) { ?>
@@ -29,23 +24,18 @@ if ($a > $b) {
29
24
<?php } ?>
30
25
]]>
31
26
</code >
32
- <code title =" Invalid: Closing brace misaligned with opening brace." >
27
+ <code title =" Invalid: Closing brace misaligned with line containing opening brace." >
33
28
<![CDATA[
34
29
function foo()
35
30
{
36
31
echo 'opening brace at column 1';
37
32
echo 'closing brace at column 2';
38
33
<em> }</em>
39
34
40
- class Foo {
41
- echo 'class keyword starts at column 1';
42
- echo 'closing brace at column 2';
43
- <em> }</em>
44
-
45
- if ($a > $b) {
46
- echo 'conditional starts at column 1';
47
- echo 'closing brace at column 5';
48
- <em> }</em>
35
+ if (!class_exists('Foo')) {
36
+ class Foo {
37
+ <em> }</em>
38
+ <em> }</em>
49
39
50
40
<?php if ($something) { ?>
51
41
<p>conditional opening tag at column 1</p>
You can’t perform that action at this time.
0 commit comments