BaseEnum : correction on code comments

This commit is contained in:
Jérémy Munsch 2021-09-11 22:47:41 +02:00
parent e687db37e7
commit 7bbbe28e27
No known key found for this signature in database
GPG key ID: 677E1F9F80C16560

View file

@ -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