RegistersMethod   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethods() 0 3 1
A registerMethod() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Conia\Boiler;
6
7
trait RegistersMethod
8
{
9
    protected CustomMethods $customMethods;
10
11
    /** @psalm-param non-empty-string $name */
12 2
    public function registerMethod(string $name, callable $callable): void
13
    {
14 2
        $this->customMethods->add($name, $callable);
15
    }
16
17 3
    public function getMethods(): CustomMethods
18
    {
19 3
        return $this->customMethods;
20
    }
21
}
22