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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.3/CodeSniffer/Standards/Squiz/Tests/PHP/DisallowMultipleAssignmentsUnitTest.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
function getVar($varname='var', $var='var')
 
3
{
 
4
    $var = $var2 = getVar();
 
5
    $var = $var2 = $var3 = '';
 
6
 
 
7
    if ($varname === 'var' || $var2 === 'varname' || $var = true) {
 
8
        $var[($var + 1)] = $var2;
 
9
        $var[($var = 1)] = $var2;
 
10
    }
 
11
 
 
12
    for ($i = $var; (null !== ($key = key($i))); next($i)) {
 
13
        while ($i = true) {
 
14
            echo $i = getVar();
 
15
        }
 
16
    }
 
17
 
 
18
    while ($row = $query->fetch(PDO::FETCH_NUM)) {
 
19
        $result[$row[0]] = array()
 
20
        $result[$row[0]][] = $current;
 
21
 
 
22
        self::$_inTransaction = TRUE;
 
23
        $$varName = $varValue;
 
24
    }
 
25
 
 
26
}//end getVar()
 
27
 
 
28
class myClass
 
29
{
 
30
    private static $_dbh = NULL;
 
31
    public $dbh = NULL;
 
32
    protected $dbh = NULL;
 
33
}
 
34
 
 
35
$var = $var2;
 
36
list ($a, $b) = explode(',', $c);
 
37
$var1 ? $var2 = 0 : $var2 = 1;
 
38
 
 
39
$obj->$classVar = $prefix.'-'.$type;
 
40
 
 
41
$closureWithDefaultParamter = function(array $testArray=array()) {};
 
42
?>