~ubuntu-branches/ubuntu/utopic/php-codesniffer/utopic

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.3.4/CodeSniffer/Standards/Squiz/Tests/WhiteSpace/ControlStructureSpacingUnitTest.js

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2013-07-12 15:16:25 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130712151625-4autdc0twzbueha9
Tags: 1.5.0~rc2-1
* New upstream release.
* Refreshed patch.
* Standards-Version is now 3.9.4.
* Canonical VCS URLs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
if (something) {
3
 
}
4
 
for (i = 0; i < 10; i++) {
5
 
}
6
 
 
7
 
while (true) {
8
 
    for (i = 0; i < 10; i++) {
9
 
    }
10
 
    if (something) {
11
 
    }
12
 
 
13
 
    do {
14
 
    } while (true);
15
 
 
16
 
}
17
 
 
18
 
if (one) {
19
 
} else (two) {
20
 
} else if (three) {
21
 
}
22
 
if (one) {
23
 
} else (two) {
24
 
} else if (three) {
25
 
}
26
 
 
27
 
switch (blah) {
28
 
    case 'one':
29
 
        if (blah) {
30
 
            // There are no spaces before break.
31
 
        }
32
 
    break;
33
 
 
34
 
    default:
35
 
        if (blah) {
36
 
            // There are no spaces before break.
37
 
        }
38
 
    break;
39
 
}
40
 
 
41
 
switch (blah) {
42
 
    case 'one':
43
 
        if (blah) {
44
 
            // There are no spaces before break.
45
 
        }
46
 
    break;
47
 
 
48
 
    default:
49
 
        if (blah) {
50
 
            // Code here.
51
 
        }
52
 
}
53
 
 
54
 
for (i = 0; i < 10; i++) {
55
 
    if (blah) {
56
 
    }
57
 
    break;
58
 
}
59
 
 
60
 
while (true) {
61
 
    for (i = 0; i < 10; i++) {
62
 
 
63
 
        if (something) {
64
 
        }
65
 
 
66
 
    }
67
 
 
68
 
    do {
69
 
 
70
 
        alert(i);
71
 
    } while (true);
72
 
}
73
 
 
74
 
for (  i = 0; i < 10; i++  ) {
75
 
    if ( blah   ) {
76
 
    }
77
 
}
78
 
 
79
 
var x = {
80
 
    a: function () {
81
 
        if (blah) {
82
 
        }
83
 
 
84
 
    },
85
 
};
86
 
?>
 
 
b'\\ No newline at end of file'