PHPackages                             dchesterton/phpdoc-to-return - 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. dchesterton/phpdoc-to-return

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

dchesterton/phpdoc-to-return
============================

Convert PHPDoc @return hints to PHP7/Hack native return type syntax

v0.1.1(11y ago)326MITPHPPHP &gt;=5.4

Since Jan 20Pushed 11y ago1 watchersCompare

[ Source](https://github.com/dchesterton/phpdoc-to-return)[ Packagist](https://packagist.org/packages/dchesterton/phpdoc-to-return)[ RSS](/packages/dchesterton-phpdoc-to-return/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Command line tool to convert PHPDoc @return hints to new PHP 7 return type syntax. (Requires PHP 5.4+)

Installation
============

[](#installation)

Install the package globally using Composer: `composer global require dchesterton/phpdoc-to-return`

Usage
=====

[](#usage)

Navigate to the directory you wish to convert, then simply call `phpdoc-to-return`.

By default, the tool will overwrite the code but you can optionally specify the source and destination folders using the `--src` and `--dest` options.

```
phpdoc-to-return --src=lib --dest=converted

```

Hack
----

[](#hack)

The tool has basic support for converting to [Hack Return Types](http://docs.hhvm.com/manual/en/hack.annotations.types.php)

```
phpdoc-to-return --src=lib --hack

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4135d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a5d2eff4c89f7749fc74bd3f1d419251a7081f4429f491469f2c5ca4451cf2d1?d=identicon)[dchesterton](/maintainers/dchesterton)

### Embed Badge

![Health badge](/badges/dchesterton-phpdoc-to-return/health.svg)

```
[![Health](https://phpackages.com/badges/dchesterton-phpdoc-to-return/health.svg)](https://phpackages.com/packages/dchesterton-phpdoc-to-return)
```

###  Alternatives

[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

4743.5k10](/packages/phel-lang-phel-lang)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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