Skip to content

Commit

Permalink
Merge pull request #22 from ilyosjon09/fix/update-namespaces
Browse files Browse the repository at this point in the history
refactor: move namespace to PinkaryProject
  • Loading branch information
nunomaduro authored Apr 24, 2024
2 parents 5b209db + 18b10f6 commit de7597c
Show file tree
Hide file tree
Showing 6 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/gloss-php/type-guard/master/docs/example.jpg" height="300" alt="Skeleton Php">
<img src="https://raw.githubusercontent.com/pinkary-project/type-guard/master/docs/example.jpg" height="300" alt="Logo of Pinkary Project">
<p align="center">
<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>
<a href="https://github.com/pinkary-project/type-guard/actions"><img alt="GitHub Workflow Status (master)" src="https://github.com/pinkary-project/type-guard/actions/workflows/tests.yml/badge.svg"></a>
<a href="https://packagist.org/packages/pinkary-project/type-guard"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/pinkary-project/type-guard"></a>
<a href="https://packagist.org/packages/pinkary-project/type-guard"><img alt="Latest Version" src="https://img.shields.io/packagist/v/pinkary-project/type-guard"></a>
<a href="https://packagist.org/packages/pinkary-project/type-guard"><img alt="License" src="https://img.shields.io/packagist/l/pinkary-project/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 [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.
Type Guard module is part of the [Pinkary Project](https://github.com/pinkary-project), 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 gloss-php/type-guard
composer require pinkary-project/type-guard
```

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

------

**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)**.
**Type Guard** is part of the [Pinkary Project](https://github.com/pinkary-project) 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": "gloss-php/type-guard",
"name": "pinkary-project/type-guard",
"description": "Type Guard module is part of the Gloss PHP, and allows you to narrow down the type of an variable to a more specific type.",
"keywords": ["gloss-php", "type-guard", "assert", "narrow", "type", "php"],
"keywords": ["pinkary-project", "type-guard", "assert", "narrow", "type", "php"],
"license": "MIT",
"authors": [
{
Expand All @@ -22,7 +22,7 @@
},
"autoload": {
"psr-4": {
"GlossPHP\\TypeGuard\\": "src/"
"PinkaryProject\\TypeGuard\\": "src/"
},
"files": [
"src/Functions.php"
Expand Down
Binary file removed docs/example.jpg
Binary file not shown.
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 GlossPHP\TypeGuard\Type;
use PinkaryProject\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 GlossPHP\TypeGuard;
namespace PinkaryProject\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 GlossPHP\TypeGuard;
namespace PinkaryProject\TypeGuard;

use TypeError;

Expand Down

0 comments on commit de7597c

Please sign in to comment.