PHPackages                             gabrieljmj/phptypehinting - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gabrieljmj/phptypehinting

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gabrieljmj/phptypehinting
=========================

Quick fix for type hinting with PHP

06PHP

Since Apr 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/GabrielJMJ/PhpTypeHinting)[ Packagist](https://packagist.org/packages/gabrieljmj/phptypehinting)[ RSS](/packages/gabrieljmj-phptypehinting/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

TypeHinting
===========

[](#typehinting)

Quick fix for type hinting with PHP.

Install
-------

[](#install)

Composer:

```
"gabrieljmj/phptypehinting": "dev-master"
```

Usage
-----

[](#usage)

```
use Gabrieljmj\PhpTypeHinting\TypeHinting;

TypeHinting::init();

function hello(string $name) {
    echo 'Hello ' . $name;
}

hello('Gabriel');
```

will return

```
Hello Gabriel

```

but

```
hello(87);
```

will get

```
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Argument 1 passed to hello() must be string type, integer given' ...

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fcbdf815749595d3dcfd4fb781e2cac05aa6d132123aa9da889d2c5ca6c8e11?d=identicon)[GabrielJMJ](/maintainers/GabrielJMJ)

---

Top Contributors

[![gabrieljmj](https://avatars.githubusercontent.com/u/2223216?v=4)](https://github.com/gabrieljmj "gabrieljmj (6 commits)")

### Embed Badge

![Health badge](/badges/gabrieljmj-phptypehinting/health.svg)

```
[![Health](https://phpackages.com/badges/gabrieljmj-phptypehinting/health.svg)](https://phpackages.com/packages/gabrieljmj-phptypehinting)
```

###  Alternatives

[mischiefcollective/colorjizz

Classes for manipulating colors, converting to different formats and finding color harmonies

286847.8k13](/packages/mischiefcollective-colorjizz)[smile/module-map

Smile Map Utilities Module

10536.8k2](/packages/smile-module-map)[t3kit/theme-t3kit

Base Theme fot t3kit project

2410.2k](/packages/t3kit-theme-t3kit)[mix/mix-skeleton

Full-featured development skeleton

132.1k](/packages/mix-mix-skeleton)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
