BaseEnum: remove unused herited closure case
This commit is contained in:
parent
7bbbe28e27
commit
0bb9a6f9b8
1 changed files with 0 additions and 8 deletions
|
|
@ -3,7 +3,6 @@
|
|||
namespace Kwaadpepper\Enum;
|
||||
|
||||
use BadMethodCallException;
|
||||
use Closure;
|
||||
use JsonSerializable;
|
||||
use Kwaadpepper\Enum\Exceptions\DuplicateLabelsException;
|
||||
use Kwaadpepper\Enum\Exceptions\DuplicateValuesException;
|
||||
|
|
@ -251,13 +250,6 @@ abstract class BaseEnum implements JsonSerializable
|
|||
$valueMap = static::values();
|
||||
$labelMap = static::labels();
|
||||
|
||||
if ($valueMap instanceof Closure) {
|
||||
$valueMap = array_map($valueMap, array_combine($matches[1], $matches[1]));
|
||||
}
|
||||
if ($labelMap instanceof Closure) {
|
||||
$labelMap = array_map($labelMap, array_combine($matches[1], $matches[1]));
|
||||
}
|
||||
|
||||
foreach ($matches[1] as $methodName) {
|
||||
$valueMap[$methodName] = $valueMap[$methodName] ?? $methodName;
|
||||
$labelMap[$methodName] = $labelMap[$methodName] ?? $methodName;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue