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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.0RC2/CodeSniffer/Standards/Generic/Tests/ControlStructures/InlineControlStructureUnitTest.inc

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2014-07-21 14:42:41 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20140721144241-t0v9knmgtzftbsw6
Tags: upstream-1.5.3
Import upstream version 1.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
if ($something) echo 'hello';
4
 
 
5
 
if ($something) {
6
 
    echo 'hello';
7
 
} else echo 'hi';
8
 
 
9
 
if ($something) {
10
 
    echo 'hello';
11
 
} else if ($else) echo 'hi';
12
 
 
13
 
foreach ($something as $thing) echo 'hello';
14
 
 
15
 
for ($i; $i > 0; $i--) echo 'hello';
16
 
 
17
 
while ($something) echo 'hello';
18
 
 
19
 
do {
20
 
    $i--;
21
 
} while ($something);
22
 
 
23
 
if(true)
24
 
  $someObject->{$name};
25
 
 
26
 
if (true) :
27
 
    $foo = true;
28
 
endif;
29
 
 
30
 
while (true) :
31
 
    $foo = true;
32
 
endwhile;
33
 
 
34
 
for ($i; $i > 0; $i--) :
35
 
    echo 'hello';
36
 
endfor;
37
 
 
38
 
foreach ($array as $element) :
39
 
    echo 'hello';
40
 
endforeach;
41
 
 
42
 
?>