Passed
Branch master (df2ee3)
by Dawid
07:19 queued 02:10
created

Events   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCheckSchemaEventNameFor() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiechu\SymfonyCommonsBundle\Event\ResponseSchemaCheck;
6
7
use Spiechu\SymfonyCommonsBundle\Utils\StringUtils;
8
9
final class Events
10
{
11
    /**
12
     * @Event("Spiechu\SymfonyCommonsBundle\Event\ResponseSchemaCheck\CheckResult")
13
     */
14
    public const CHECK_RESULT = 'spiechu_symfony_commons.event.response_schema_check.check_result';
15
16
    private const CHECK_SCHEMA_EVENT_NAME_PATTERN = 'spiechu_symfony_commons.event.response_schema_check.check_schema_%s';
17
18 1
    public static function getCheckSchemaEventNameFor(string $format): string
19
    {
20 1
        StringUtils::assertNotEmpty($format);
21
22 1
        return sprintf(self::CHECK_SCHEMA_EVENT_NAME_PATTERN, strtolower($format));
23
    }
24
}
25