PhpMethod::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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