File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88namespace JeckelLab \NotificationBundle \ValueObject ;
99
1010use JeckelLab \AdvancedTypes \Enum \EnumAbstract ;
11- use JeckelLab \AdvancedTypes \ValueObject \ValueObject ;
1211
1312/**
1413 * Class NotificationLevel
1716 * @method static NotificationLevel INFO();
1817 * @method static NotificationLevel WARNING();
1918 * @method static NotificationLevel DANGER();
19+ * @method string getValue();
2020 * @psalm-immutable
21+ * @extends EnumAbstract<string>
2122 */
22- class NotificationLevel extends EnumAbstract implements ValueObject
23+ class NotificationLevel extends EnumAbstract
2324{
2425 public const SUCCESS = 'success ' ;
2526 public const INFO = 'info ' ;
@@ -37,4 +38,12 @@ public function __toString(): string
3738 }
3839 return parent ::__toString ();
3940 }
41+
42+ /**
43+ * @return string
44+ */
45+ public function toScalar (): string
46+ {
47+ return $ this ->getValue ();
48+ }
4049}
You can’t perform that action at this time.
0 commit comments