Test Failed
Push — lazy-services ( 2f8c8b...8212a3 )
by Dmitriy
16:14 queued 13:07
created

TagHelper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isTagAlias() 0 3 1
A extractTagFromAlias() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Di\Helpers;
6
7
/**
8
 * @internal
9
 */
10
final class TagHelper
11
{
12
    public static function extractTagFromAlias(string $alias): string
13
    {
14
        return substr($alias, 4);
15
    }
16
17
    public static function isTagAlias(string $id): bool
18
    {
19
        return str_starts_with($id, 'tag@');
20
    }
21
}
22