Skip to content

Commit

Permalink
Fix EnumLabel prefix calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Schmitt committed Dec 9, 2024
1 parent 7a76c24 commit 5f0082b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Classes/Domain/Enum/EnumLabel.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<?php

/*
* This file is part of the PackageFactory.AtomicFusion.PresentationObjects package.
*/

declare(strict_types=1);

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

return new self(
$enumShort . '.',
Expand Down

0 comments on commit 5f0082b

Please sign in to comment.