Issues (135)

src/Util/String/ClassNameSegmentHelper.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gember\EventSourcing\Util\String;
6
7
final readonly class ClassNameSegmentHelper
0 ignored issues
show
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 7 at column 6
Loading history...
8
{
9
    /**
10
     * @param class-string $className
11
     */
12 8
    public static function getLastSegment(string $className): string
13
    {
14 8
        if (!str_contains($className, '\\')) {
15 1
            return $className;
16
        }
17
18 7
        return substr($className, strrpos($className, '\\') + 1);
19
    }
20
}
21