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

CompanyGenerator::company()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 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