Skip to content
Snippets Groups Projects
Unverified Commit 3da42cc1 authored by Marc Bennewitz's avatar Marc Bennewitz Committed by GitHub
Browse files

Merge pull request #156 from jdecool/stringable-implementation

Implement Stringable interface on Enum
parents 2eb0a502 3ddddff1
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,10 @@
"autoload": {
"psr-4": {
"MabeEnum\\": "src/"
}
},
"classmap": [
"stubs/Stringable.php"
]
},
"autoload-dev": {
"psr-4": {
......
<?xml version="1.0"?>
<psalm
totallyTyped="true"
errorLevel="1"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......
......@@ -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