~ubuntu-branches/ubuntu/wily/php-codesniffer/wily-proposed

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-2.3.3/CodeSniffer/Standards/Squiz/Tests/ControlStructures/ForLoopDeclarationUnitTest.js

  • Committer: Package Import Robot
  • Author(s): David Prévot, Greg Sherwood
  • Date: 2015-06-24 13:41:36 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20150624134136-dv60dnl6s20tdxwr
Tags: 2.3.3-1
[ Greg Sherwood ]
Prepare for 2.3.3 release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Valid.
 
2
for (var i = 0; i < 10; i++) {
 
3
}
 
4
 
 
5
// Invalid.
 
6
for ( i = 0; i < 10; i++ ) {
 
7
}
 
8
 
 
9
for (i = 0;  i < 10;  i++) {
 
10
}
 
11
 
 
12
for (var i = 0 ; i < 10 ; i++) {
 
13
}
 
14
 
 
15
for (i = 0;i < 10;i++) {
 
16
}
 
17
 
 
18
// The works.
 
19
for ( var i = 0 ;  i < 10 ;  i++ ) {
 
20
}
 
21
 
 
22
this.formats = {};
 
23
dfx.inherits('ContentFormat', 'Widget');
 
24
 
 
25
for (var widgetid in this.loadedContents) {
 
26
    if (dfx.isset(widget) === true) {
 
27
        widget.loadAutoSaveCWidgetStore.setData('activeScreen', null);widget.getContents(this.loadedContents[widgetid], function() {self.widgetLoaded(widget.id);});
 
28
    }
 
29
}
 
30
 
 
31
for (var i = 0; i < 10;) {
 
32
}
 
33
for (var i = 0; i < 10; ) {
 
34
}
 
35
 
 
36
for (var i = 0; ; i++) {
 
37
}
 
38
for (var i = 0;; i++) {
 
39
}
 
40
 
 
41
// @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 1
 
42
// @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 1
 
43
for (var i = 0; i < 10; i++) {}
 
44
for ( var i = 0; i < 10; i++ ) {}
 
45
for (  var i = 0; i < 10; i++  ) {}
 
46
// @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesAfterOpen 0
 
47
// @codingStandardsChangeSetting Squiz.ControlStructures.ForLoopDeclaration requiredSpacesBeforeClose 0
 
 
b'\\ No newline at end of file'