File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
src/Minimalcode/Enumeration Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -136,17 +136,6 @@ final public static function forOrdinal($ordinal)
136
136
throw new InvalidArgumentException ($ message . ' Found: ' . implode (', ' , static ::getOrdinals ()));
137
137
}
138
138
139
- /**
140
- * @return static[]
141
- * @throws \ReflectionException
142
- * @throws LogicException On ambiguous constant values
143
- * @deprecated will be removed, use getEnumerators()
144
- */
145
- final public static function all ()
146
- {
147
- return static ::getEnumerators ();
148
- }
149
-
150
139
/**
151
140
* Get a list of enumerator instances
152
141
*
@@ -323,11 +312,11 @@ final public function getOrdinal()
323
312
* Get the name of the enumerator
324
313
*
325
314
* @return string
326
- * @see getName ()
315
+ * @see getValue ()
327
316
*/
328
317
public function __toString ()
329
318
{
330
- return $ this ->name ;
319
+ return \is_scalar ( $ this -> value ) ? ( string ) $ this -> value : $ this ->name ;
331
320
}
332
321
333
322
/**
You can’t perform that action at this time.
0 commit comments