MagicUsage   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMessage() 0 7 1
1
<?php
2
3
namespace Solidifier\Defects;
4
5
use Solidifier\Defect;
6
use PhpParser\PrettyPrinter\Standard;
7
8
class MagicUsage extends Defect
9
{
10
    public function getMessage()
11
    {
12
        $formatter = new Standard();
13
        $code = $formatter->prettyPrint(array($this->node));
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
14
        
15
        return 'Magic usage : ' . $code;
16
    }
17
}
18