Skip to content

Commit d825f42

Browse files
committed
Update value object
1 parent 5bd80e9 commit d825f42

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/ValueObject/NotificationLevel.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace JeckelLab\NotificationBundle\ValueObject;
99

1010
use JeckelLab\AdvancedTypes\Enum\EnumAbstract;
11-
use JeckelLab\AdvancedTypes\ValueObject\ValueObject;
1211

1312
/**
1413
* Class NotificationLevel
@@ -17,9 +16,11 @@
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
}

0 commit comments

Comments
 (0)