2017 © Pedro Peláez
 

library hphpdoc

An API documentation generator for Hack/HHVM and PHP

image

appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  • Sunday, February 26, 2017
  • by doublecompile
  • Repository
  • 1 Watchers
  • 3 Stars
  • 38 Installations
  • Hack
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

hphpdoc

API Documentation Generator for Hack/HHVM and PHP, (*1)

Check out some example documentation: actually, it's our own API. Please have a look., (*2)

Packagist Build Status, (*3)

Installation

You can install this library using Composer:, (*4)

$ composer require appertly/hphpdoc
  • The master branch (version 0.x) of this project requires HHVM 3.12 and depends on appertly/axe, appertly/cleopatra, and fredemmott/definition-finder.

Compliance

Releases of this library will conform to Semantic Versioning., (*5)

Our code is intended to comply with PSR-1, PSR-2, and PSR-4. If you find any issues related to standards compliance, please send a pull request!, (*6)

Usage

You can view a list of all command line options with the -h or --help flags, or by simply calling the hphpdoc executable with no arguments., (*7)

Usage:  hphpdoc [options] [--] [args...]

hphpdoc generates API documentation for Hack and PHP files.

Options:
  -h --help     Show this help screen
  --version     Displays version information
  -v --verbose  Increases verbosity level (can be used more than once, e.g.
                -vvv)
  -q --quiet    Prevents any output except errors; supercedes the verbose
                setting
  -x --exclude  Excludes specific files and folders from scanning (can be used
                more than once), wildcards are not supported
  -o --output   Specifies the directory for generated documentation; defaults
                to PWD

For example:, (*8)

hphpdoc -v -x tests -o build/api .

PHPDoc Syntax

For the most part, we're trying to cover everything in PSR-5. This initial release covers many tags, but not all of them just yet., (*9)

Being that Hack has more strict typehints than PHP 5, you can omit types from your @var, @param, and @return PHPDoc tags if you choose!, (*10)

/**
 * @var You can omit the type here, or…
 */
protected string $something = "nothing";
/**
 * …you can just specify a description here. The type is detected automatically!
 */
protected Vector<string> $test = Vector{'foo'};
/**
 * This is my method.
 *
 * This is a description.
 *
 * @param $name - The name
 * @param $numbers - The numbers
 * @param $log - The log
 * @return - The thing you need. Always specify a dash before description.
 * @throws \RuntimeException if anything goes wrong
 */
public function getFoo(string $name, ConstVector<int> $numbers, Psr\Log\LoggerInterface $log): ?Foo<Bar>
{
    return null;
}

If your return type or parameter typehint is mixed, hphpdoc will fall back to the PHPDoc tag type, if one is specified. Example:, (*11)

/**
 * @return array<string>|string|null The return type
 */
function nope(): mixed
{
    return null;
}

The Versions

26/02 2017

dev-master

9999999-dev http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

03/10 2016

0.4.0

0.4.0.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

18/09 2016

0.3.3

0.3.3.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

16/08 2016

0.3.2

0.3.2.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

15/08 2016

0.3.1

0.3.1.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

15/08 2016

0.3.0

0.3.0.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

25/05 2016

0.2.1

0.2.1.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

23/05 2016

0.2.0

0.2.0.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm

17/05 2016

0.1.0

0.1.0.0 http://github.com/appertly/hphpdoc

An API documentation generator for Hack/HHVM and PHP

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api php documentation hack hhvm