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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-2.3.3/CodeSniffer/Standards/PEAR/Tests/NamingConventions/ValidVariableNameUnitTest.inc

  • 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
class MyClass
 
3
{
 
4
    $varName  = 'hello';
 
5
    $var_name = 'hello';
 
6
    $varname  = 'hello';
 
7
    $_varName = 'hello';
 
8
 
 
9
    public $varName  = 'hello';
 
10
    public $var_name = 'hello';
 
11
    public $varname  = 'hello';
 
12
    public $_varName = 'hello';
 
13
 
 
14
    protected $varName  = 'hello';
 
15
    protected $var_name = 'hello';
 
16
    protected $varname  = 'hello';
 
17
    protected $_varName = 'hello';
 
18
 
 
19
    private $_varName  = 'hello';
 
20
    private $_var_name = 'hello';
 
21
    private $_varname  = 'hello';
 
22
    private $varName   = 'hello';
 
23
}
 
24
 
 
25
class MyClass
 
26
{
 
27
  function func1()
 
28
  {
 
29
    function func2()
 
30
    {
 
31
     return $a;
 
32
    }
 
33
    return $data;
 
34
  }
 
35
}
 
36
 
 
37
class MyClass
 
38
{
 
39
    public function prepare() {}
 
40
    public function paint() {}
 
41
}
 
42
 
 
43
if (true) {
 
44
    class MyClass
 
45
    {
 
46
        $varName  = 'hello';
 
47
        $var_name = 'hello';
 
48
    }
 
49
}
 
50
 
 
51
class MyClass {
 
52
    function myFunction($cc, $cv) {
 
53
        $req = "delete from blah
 
54
                where not (POP_{$cc}_A =
 
55
'{$this->def["POP_{$cc}_A"]}'
 
56
                         and POP_{$cc}_B =
 
57
'{$this->def["POP_{$cc}_B"]}')";
 
58
    }
 
59
}
 
60
 
 
61
class mpgResponse{
 
62
   var $term_id;
 
63
   var $currentTag;
 
64
   function characterHandler($parser,$data){
 
65
       switch($this->currentTag)
 
66
       {
 
67
           case "term_id": {
 
68
               $this->term_id=$data;
 
69
               break;
 
70
           }
 
71
       }
 
72
   }//end characterHandler
 
73
}//end class mpgResponse
 
74
 
 
75
class foo
 
76
{
 
77
    const bar = <<<BAZ
 
78
qux
 
79
BAZ;
 
80
}
 
81
 
 
82
class foo
 
83
{
 
84
    var $c = <<<C
 
85
ccc
 
86
C;
 
87
}
 
88
 
 
89
class a
 
90
{
 
91
    protected
 
92
        $_sheet,
 
93
        $_FieldParser,
 
94
        $_key;
 
95
}
 
96
?>