From 4cc27e676950690d5d398de53ecd267260cf5a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Sat, 11 Sep 2021 22:44:06 +0200 Subject: [PATCH] BaseEnumRoutable : remove unused getEnumName add NotImplementedException for all unsued methods --- src/BaseEnumRoutable.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/BaseEnumRoutable.php b/src/BaseEnumRoutable.php index d8ecedc..938910b 100644 --- a/src/BaseEnumRoutable.php +++ b/src/BaseEnumRoutable.php @@ -21,7 +21,7 @@ abstract class BaseEnumRoutable extends BaseEnum implements UrlRoutable */ public function getRouteKey() { - return $this->value; + throw new NotImplementedException('getRouteKey not implemented, should not be used.'); } /** @@ -31,7 +31,7 @@ abstract class BaseEnumRoutable extends BaseEnum implements UrlRoutable */ public function getRouteKeyName() { - throw new NotImplementedException('getRouteKeyName not implemented, should not be used'); + throw new NotImplementedException('getRouteKeyName not implemented, should not be used.'); } /** @@ -69,17 +69,6 @@ abstract class BaseEnumRoutable extends BaseEnum implements UrlRoutable */ public function resolveChildRouteBinding($childType, $value, $field) { - throw new NotImplementedException('resolveChildRouteBinding not implemented, should not be used'); - } - - /** - * Get the Enum name from class name - * - * @return string - */ - public static function getEnumName() - { - $cls = explode('\\', static::class); - return array_pop($cls); + throw new NotImplementedException('resolveChildRouteBinding not implemented, should not be used.'); } }