PhpMethod   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 77.78%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 27
ccs 7
cts 9
cp 0.7778
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getName() 0 4 1
A isStatic() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace Bigwhoop\Trumpet\CodeParsing\Php;
4
5
final class PhpMethod
6
{
7
    use SourceTrait;
8
9
    /** @var string */
10
    private $name = '';
11
12
    /** @var bool */
13
    private $isStatic = false;
14
15 8
    public function __construct(string $name, bool $isStatic, string $source)
16
    {
17 8
        $this->name = $name;
18 8
        $this->isStatic = $isStatic;
19 8
        $this->source = $source;
20 8
    }
21
22 8
    public function getName(): string
23
    {
24 8
        return $this->name;
25
    }
26
27
    public function isStatic(): bool
28
    {
29
        return $this->isStatic;
30
    }
31
}
32