Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
faissaloux committed Mar 30, 2024
1 parent cd86cbc commit f71b291
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,18 @@ composer require std-library/type-guard

## Usage

- [`asNumeric()`](#asnumeric)
- [`asInt()`](#asint)
- [`asString()`](#asstring)

### `asNumeric()`

Asserts and narrows down the type of the given variable to a numeric.

```php
$variable = type($variable)->asNumeric();
```

### `asInt()`

Asserts and narrows down the type of the given variable to an integer.
Expand Down

0 comments on commit f71b291

Please sign in to comment.