Skip to content

Respect/Doc

Repository files navigation

Respect\Doc\Doc

Generates docs that rocks your socks off.

Why it rock your socks off:

  1. Tested code rocks! So it uses your PHPUnit tests as examples.
  2. Doc comments, like this, are really optional.
  3. This very documentation was generated by the project itself from the code itself.

More Info:

__construct($classOrNamespace, $documentAs=null)

Receives the namespace or class to be documented

Example 1:

$doc    = new Doc('Respect'); //Full Namespace
$title  = 'Respect\Doc\Doc' . PHP_EOL 
        . '===========';
$this->assertStringStartsWith($title, (string) $doc);

Example 2:

$doc    = new Doc('Respect\Doc'); //Specific |class Name
$title  = 'Respect\Doc\Doc' . PHP_EOL 
        . '===========';
$this->assertStringStartsWith($title, (string) $doc);

__toString()

Returns the documentation in markdown

Example 1:

$class     = 'Respect\Doc';
$doc       = new Doc($class);
$markdown  = (string) $doc;
$doc       = file_put_contents('../README.md', $markdown); //Happy Panda
$this->assertStringEqualsFile('../README.md', $markdown);

Respect\Doc\DocItem

DocItem Reflection Class to speak where is the socks to rock it.

More Info:

getClassContent()

getSections()

__call($method, $parameters)

__construct($item)

__construct Construct a doc Item

More Info:

  • Access: public
  • Return: void

Respect\Doc\MarkDown

speak Markdownish

More Info:

get(array , $sections)

About

Generates docs that rocks your socks off.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages