Passed
Push — main ( 1a17f8...8155a4 )
by Chema
10:50 queued 09:35
created

CompanyGenerator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 2
dl 0
loc 12
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A company() 0 5 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\BindingsInsideProvider\Module\Domain\Greeter;
6
7
use GacelaTest\Feature\Framework\BindingsInsideProvider\Module\Domain\GreeterGeneratorInterface;
8
9
use function sprintf;
10
11
final class CompanyGenerator implements GreeterGeneratorInterface
12
{
13
    public function __construct(
14
        private readonly Team $team,
15
    ) {
16
    }
17
18
    public function company(string $name): string
19
    {
20
        $teamNames = $this->team->getNames();
21
22
        return sprintf('Hello %s! Team: %s', $name, $teamNames);
23
    }
24
}
25