testRuleAppliesWhenLocalVariableIsUsedInStaticMemberPrefix   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A bar() 0 4 1
1
<?php
2
/**
3
 * This file is part of PHP Mess Detector.
4
 *
5
 * Copyright (c) Manuel Pichler <[email protected]>.
6
 * All rights reserved.
7
 *
8
 * Licensed under BSD License
9
 * For full copyright and license information, please see the LICENSE file.
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @author Manuel Pichler <[email protected]>
13
 * @copyright Manuel Pichler. All rights reserved.
14
 * @license https://opensource.org/licenses/bsd-license.php BSD License
15
 * @link http://phpmd.org/
16
 */
17
18
class testRuleAppliesWhenLocalVariableIsUsedInStaticMemberPrefix
19
{
20
    private static $_foo = 23;
21
    public static $foo = 17;
22
23
    public function bar()
24
    {
25
        self::${$_foo = 'foo'} = 42;
26
    }
27
}
28
29
$o = new testRuleAppliesWhenLocalVariableIsUsedInStaticMemberPrefix();
30
$o->bar();
31
var_dump($o::$foo);
0 ignored issues
show
Security Debugging Code introduced by
var_dump($o::$foo); looks like debug code. Are you sure you do not want to remove it? This might expose sensitive data.
Loading history...
32