From 7bbbe28e279ad6bccfb52b4d59e8994d65ffc15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Sat, 11 Sep 2021 22:47:41 +0200 Subject: [PATCH] BaseEnum : correction on code comments --- src/BaseEnum.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BaseEnum.php b/src/BaseEnum.php index 3e10d6f..c5bccc3 100644 --- a/src/BaseEnum.php +++ b/src/BaseEnum.php @@ -59,7 +59,7 @@ abstract class BaseEnum implements JsonSerializable * @param string $name * @param array $arguments * @return static - * @throws TypeError If anything else thant string or int is used. + * @throws TypeError If anything else than string or int is used. * @throws BadMethodCallException If a matching definition cannot be found. */ // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceAfterLastUsed @@ -145,11 +145,11 @@ abstract class BaseEnum implements JsonSerializable } /** - * Get the enum definition + * Get the enum definition name * - * @return mixed|null + * @return string|null */ - public function getDefinition() + public function getDefinition(): ?string { $className = static::class; foreach (self::$definitionCache[$className] as $definition => $enum) { @@ -165,7 +165,7 @@ abstract class BaseEnum implements JsonSerializable * * @param string|int $value * @return static - * @throws TypeError If anything else thant string or int is used. + * @throws TypeError If anything else than string or int is used. * @throws BadMethodCallException If a matching definition cannot be found. */ public static function make($value): BaseEnum