Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jan 23, 2024
1 parent 314e899 commit 35e741c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Enum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ Gather information regarding the current Enum via **public static methods**. Thi
- the type of enum via the `isBacked` and `isPure` method;
- the names of each cases with the `names` method;
- the possible values for the Enum with the `values` method;
- the `associative` method which returns an associative array contains the string name and their respective values;
- the `nameOf` which returns the name associated with a specific `value`
- the `toJavaScript` which returns a Javascript structure equivalent to the current Enum.(see `JavaScriptConverter` for more details)

```php
<?php
Expand All @@ -81,7 +79,6 @@ HttpMethod::names(); // returns a list of all the names in the enumeration
HttpMethod::values(); // returns a list of all the names in the enumeration
HttpMethod::nameOf(404); // returns the name associated with the given value
// or null if it does not exist for the submitted value.
HttpMethod::toJavaScript(); // returns a Javascript structure equivalent
```

You need the `Bakame\Aide\Enum\Info` trait to expose the new API.
Expand Down Expand Up @@ -183,7 +180,7 @@ Javascript equivalent structure.
<?php

HttpMethod::toAssociative(); // returns tha associative array
HttpMethod::toJavaScript(); // returns a Javascript structure equivalent code
HttpMethod::toJavaScript(); // returns a Javascript structure equivalent code as string
```

You need the `Bakame\Aide\Enum\Convert` trait to expose the new API.
Expand Down

0 comments on commit 35e741c

Please sign in to comment.