Block   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10
c 2
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A new() 0 3 1
A generate() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Murtukov\PHPCodeGenerator;
6
7
class Block extends AbstractGenerator implements BlockInterface
8
{
9
    use ScopedContentTrait;
10
11 3
    public function generate(): string
12
    {
13
        return <<<CODE
14 3
        {
15 3
        {$this->generateContent()}
16
        }
17
        CODE;
18
    }
19
20 2
    public static function new()
21
    {
22 2
        return new static();
23
    }
24
}
25