Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit e356a62

Browse files
author
Petr Knap
committed
Synchronized README.md
1 parent 687392b commit e356a62

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ And now the **same code with Enum** instead of Constants:
5151
```php
5252
<?php
5353

54-
class MyBoolean extends \PetrKnap\Php\Enum\ConstEnum
54+
class MyBoolean extends \PetrKnap\Php\Enum\Enum
5555
{
56+
use \PetrKnap\Php\Enum\ConstantsAsMembers;
57+
5658
const MY_TRUE = 1;
5759
const MY_FALSE = 2;
5860
}
@@ -82,8 +84,10 @@ isTrue(false); // uncaught type error - OK
8284
```php
8385
<?php
8486

85-
class DayOfWeek extends \PetrKnap\Php\Enum\ConstEnum
87+
class DayOfWeek extends \PetrKnap\Php\Enum\Enum
8688
{
89+
use \PetrKnap\Php\Enum\ConstantsAsMembers;
90+
8791
const SUNDAY = 0;
8892
const MONDAY = 1;
8993
const TUESDAY = 2;

0 commit comments

Comments
 (0)