Skip to content
Snippets Groups Projects
Unverified Commit 22e8d514 authored by Jérémy DECOOL's avatar Jérémy DECOOL
Browse files

Implement Stringable interface on Enum

parent 2eb0a502
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,10 @@
"MabeEnumTest\\": "tests/MabeEnumTest/",
"MabeEnumStaticAnalysis\\": "tests/MabeEnumStaticAnalysis/",
"MabeEnumBench\\": "bench/"
}
},
"classmap": [
"stubs/Stringable.php"
]
},
"extra": {
"branch-alias": {
......
......@@ -17,7 +17,7 @@ use LogicException;
*
* @psalm-immutable
*/
abstract class Enum
abstract class Enum implements \Stringable
{
/**
* The selected enumerator value
......
<?php
if (\PHP_VERSION_ID < 80000) {
interface Stringable
{
/**
* @return string
*/
public function __toString();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment