Skip to content

Commit

Permalink
Merge branch 'main' of github.com:std-library/type-guard
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Mar 30, 2024
2 parents f4d71d8 + 9a0ccc3 commit ddcc8b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

> This library is a **work in progress**. Please, do not use it in production.
Type Guard module is part of the [PHP's Standard Library](https://github.com/std-library), and allows you to **narrow down the type** of a variable to a more specific type. Using the `type` function, you can perform specific checks to determine the type of an object and then use that object in a way that is **type-safe** according to the [PHPStan](https://phpstan.org/) and [Psalm](https://psalm.dev/) static analyzers.
Type Guard module is part of the [Another Library](https://github.com/another-library), and allows you to **narrow down the type** of a variable to a more specific type. Using the `type` function, you can perform specific checks to determine the type of an object and then use that object in a way that is **type-safe** according to the [PHPStan](https://phpstan.org/) and [Psalm](https://psalm.dev/) static analyzers.

Here is an example, where we use the `type` function to narrow down the type of a variable that previously had a `mixed` type:

Expand Down Expand Up @@ -142,4 +142,4 @@ $variable = type($variable)->asArray();

------

**Type Guard** is part of the [PHP's Standard Library](https://github.com/std-library) project. It was created by **[Nuno Maduro](https://twitter.com/enunomaduro)** and open-sourced under the **[MIT license](https://opensource.org/licenses/MIT)**.
**Type Guard** is part of the [Another Library](https://github.com/another-library) project. It was created by **[Nuno Maduro](https://twitter.com/enunomaduro)** and open-sourced under the **[MIT license](https://opensource.org/licenses/MIT)**.

0 comments on commit ddcc8b3

Please sign in to comment.