Skip to content

Commit 5f0082b

Browse files
author
Bernhard Schmitt
committed
Fix EnumLabel prefix calculation
1 parent 7a76c24 commit 5f0082b

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

Classes/Domain/Enum/EnumLabel.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<?php
22

3-
/*
4-
* This file is part of the PackageFactory.AtomicFusion.PresentationObjects package.
5-
*/
6-
73
declare(strict_types=1);
84

95
namespace PackageFactory\AtomicFusion\PresentationObjects\Domain\Enum;
@@ -26,7 +22,7 @@ public static function fromEnumName(string $enumName): self
2622
list($packageNamespace, $componentName) = explode('\Presentation\\', $enumName);
2723
$pivot = \mb_strrpos($componentName, '\\') ?: null;
2824
$componentNamespace = \mb_substr($componentName, 0, $pivot);
29-
$enumShort = lcfirst(\mb_substr($componentName, $pivot + 1));
25+
$enumShort = lcfirst(\mb_substr($componentName, (is_int($pivot) ? $pivot + 1 : 0)));
3026

3127
return new self(
3228
$enumShort . '.',

0 commit comments

Comments
 (0)