Skip to content

Commit

Permalink
Merge pull request #20 from CamKem/fix/update-namespaces
Browse files Browse the repository at this point in the history
refactor: updated namespaces to gloss php
  • Loading branch information
nunomaduro authored Apr 15, 2024
2 parents d90afbc + 83dac69 commit 20fbe49
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<p align="center">
<img src="https://raw.githubusercontent.com/another-library/type-guard/master/docs/example.jpg" height="300" alt="Skeleton Php">
<img src="https://raw.githubusercontent.com/gloss-php/type-guard/master/docs/example.jpg" height="300" alt="Skeleton Php">
<p align="center">
<a href="https://github.com/another-library/type-guard/actions"><img alt="GitHub Workflow Status (master)" src="https://github.com/another-library/type-guard/actions/workflows/tests.yml/badge.svg"></a>
<a href="https://packagist.org/packages/another-library/type-guard"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/another-library/type-guard"></a>
<a href="https://packagist.org/packages/another-library/type-guard"><img alt="Latest Version" src="https://img.shields.io/packagist/v/another-library/type-guard"></a>
<a href="https://packagist.org/packages/another-library/type-guard"><img alt="License" src="https://img.shields.io/packagist/l/another-library/type-guard"></a>
<a href="https://github.com/gloss-php/type-guard/actions"><img alt="GitHub Workflow Status (master)" src="https://github.com/gloss-php/type-guard/actions/workflows/tests.yml/badge.svg"></a>
<a href="https://packagist.org/packages/gloss-php/type-guard"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/gloss-php/type-guard"></a>
<a href="https://packagist.org/packages/gloss-php/type-guard"><img alt="Latest Version" src="https://img.shields.io/packagist/v/gloss-php/type-guard"></a>
<a href="https://packagist.org/packages/gloss-php/type-guard"><img alt="License" src="https://img.shields.io/packagist/l/gloss-php/type-guard"></a>
</p>
</p>

------

> This library is a **work in progress**. Please, do not use it in production.
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.
Type Guard module is part of the [Gloss PHP](https://github.com/gloss-php), 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 @@ -53,7 +53,7 @@ $users = type($users)->as(Collection::class);
You may use [Composer](https://getcomposer.org) to install Type Guard into your PHP project:

```bash
composer require another-library/type-guard
composer require gloss-php/type-guard
```

## Usage
Expand Down Expand Up @@ -151,4 +151,4 @@ $variable = type($variable)->asIterable();

------

**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)**.
**Type Guard** is part of the [Gloss PHP](https://github.com/gloss-php) project. It was created by **[Nuno Maduro](https://twitter.com/enunomaduro)** and open-sourced under the **[MIT license](https://opensource.org/licenses/MIT)**.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "another-library/type-guard",
"name": "gloss-php/type-guard",
"description": "Type Guard module is part of the Another Library, and allows you to narrow down the type of an variable to a more specific type.",
"keywords": ["another-library", "type-guard", "assert", "narrow", "type", "php"],
"keywords": ["gloss-php", "type-guard", "assert", "narrow", "type", "php"],
"license": "MIT",
"authors": [
{
Expand All @@ -22,7 +22,7 @@
},
"autoload": {
"psr-4": {
"AnotherLibrary\\TypeGuard\\": "src/"
"GlossPHP\\TypeGuard\\": "src/"
},
"files": [
"src/Functions.php"
Expand Down
2 changes: 1 addition & 1 deletion src/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

use AnotherLibrary\TypeGuard\Type;
use GlossPHP\TypeGuard\Type;

if (! function_exists('type')) {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Not.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace AnotherLibrary\TypeGuard;
namespace GlossPHP\TypeGuard;

use TypeError;

Expand Down
2 changes: 1 addition & 1 deletion src/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace AnotherLibrary\TypeGuard;
namespace GlossPHP\TypeGuard;

use TypeError;

Expand Down

0 comments on commit 20fbe49

Please sign in to comment.