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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.1.0/CodeSniffer/Standards/PEAR/Tests/WhiteSpace/ScopeClosingBraceUnitTest.inc

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2012-05-31 16:37:24 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120531163724-u6aiaubu8ks5dh5z
Tags: 1.3.4-0.1
* Non-maintainer upload.
* New upstream release (Closes: #599617, #634825).
* Swtiched debian/copyright to format 1.0 (rewrite was needed anyway, as the
upstream license changed).
* Switched package to pkg-php-tools and debhelper 8 sequencer.
* Now running unit tests at build time (so depends on phpunit (>= 3.6)).
* Section is now PHP.
* Added missing Build-Depends-Indep: php-pear.
* Added missing ${misc:Depends}.
* Added Vcs fields.
* Added homepage field.
* Reviewed short and long description.
* Added dependency on php-timer.
* Standards-Version: is now 3.9.3 (lots of changes, see above...).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
class Test
4
 
{
5
 
    public function __construct()
6
 
    {
7
 
    }
8
 
 
9
 
    function test1()
10
 
    {
11
 
     }
12
 
 
13
 
    function test2() {}
14
 
 
15
 
    private function _test3()
16
 
    {
17
 
    }
18
 
 
19
 
}
20
 
 
21
 
 
22
 
class Test2
23
 
{
24
 
 }
25
 
 
26
 
 
27
 
public function test2()
28
 
{
29
 
    if ($str{0}) {
30
 
        $chr = $str{0};
31
 
    }
32
 
    
33
 
    if (!class_exists($class_name)) {
34
 
        echo $error;
35
 
    }
36
 
    $this->{$property} =& new $class_name($this->db_index);
37
 
    $this->modules[$module] =& $this->{$property};
38
 
}
39
 
 
40
 
foreach ($elements as $element) {
41
 
    if ($something) {
42
 
        // Do IF.
43
 
    } else if ($somethingElse) {
44
 
        // Do ELSE.
45
 
    }
46
 
}
47
 
 
48
 
switch ($foo) {
49
 
case 1:
50
 
    switch ($bar) {
51
 
    default:
52
 
        if ($something) {
53
 
            echo $string{1};
54
 
        } else if ($else) {
55
 
            switch ($else) {
56
 
            case 1:
57
 
                // Do something.
58
 
                break;
59
 
            default:
60
 
                // Do something.
61
 
            break;
62
 
            }
63
 
        }
64
 
    }
65
 
break;
66
 
case 2:
67
 
    // Do something;
68
 
    break;
69
 
}
70
 
 
71
 
?>