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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-2.3.2/CodeSniffer/Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc.fixed

  • 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
 
<?php
2
 
if ($something) {
3
 
}
4
 
foreach ($this as $that) {
5
 
}
6
 
while (true) {
7
 
    for ($i = 0; $i < 10; $i++) {
8
 
    }
9
 
    if ($something) {
10
 
    }
11
 
 
12
 
    foreach ($this as $that) {
13
 
        do {
14
 
        } while (true);
15
 
 
16
 
    }
17
 
}
18
 
 
19
 
if ($defaultPageDesign === 0
20
 
    && $defaultCascade === TRUE
21
 
    && $defaultChildDesign === 0
22
 
) {
23
 
    $settingsUpdated = FALSE;
24
 
}
25
 
 
26
 
foreach ($blah as $var) {
27
 
    if ($blah) {
28
 
    }
29
 
}
30
 
 
31
 
if ($defaultPageDesign === 0
32
 
    && $defaultCascade === TRUE
33
 
    && $defaultChildDesign === 0
34
 
) {
35
 
    $settingsUpdated = FALSE;
36
 
}
37
 
 
38
 
// @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 1
39
 
// @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 1
40
 
foreach ( $something as $blah => $that ) {}
41
 
foreach ( $something as $blah => $that ) {}
42
 
foreach ( $something as $blah => $that ) {}
43
 
// @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 0
44
 
// @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 0
45
 
 
46
 
$binary = b"binary string";