Skip to content

Commit

Permalink
docs: add sample docs generated by docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Aug 23, 2018
1 parent 243695d commit f6f8537
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ What can you put in config? Anything but we suggest you put only known options (
}
```

---
## update

> alias u
Expand All @@ -173,6 +174,7 @@ Usage Examples:
phint u --rollback Also rolls back to prev version
```

---
## test

> alias t
Expand Down Expand Up @@ -203,6 +205,7 @@ Usage Examples:
phint test -a With stubs for abstract/interface
```

---
## docs

> alias d
Expand All @@ -228,7 +231,105 @@ Usage Examples:
phint d -o docs/api.md Writes to docs/api.md (Same rule applies regarding inject/append)
```

### Sample docs

***PHP code***

```php
namespace Abc;

/**
* This is dummy class.
*
* It does nothing as of now.
* Maybe you could fix it?
*/
class Dummy
{
/**
* Alpha beta.
*
* Example:
*
* <code>
* $dummy = new Dummy;
* $dummy->alpha('john', true);
* // '...'
* </code>
*
* @param string $name
* @param bool $flag
*
* @return string|null
*/
public function alpha($name, $flag)
{
//
}
}
```

***Generated Markdown***

```md
## Dummy

```php
use Abc\Dummy;
```\

> This is dummy class.

It does nothing as of now.
Maybe you could fix it?

### alpha()

> Alpha beta.

```php
alpha(string $name, bool $flag): string|null
```\

Example:

```php
$dummy = new Dummy;
$dummy->alpha('john', true);
// '...'
```\
```

***Preview***

## Dummy

```php
use Ahc\Dummy;
```

> This is dummy class.
It does nothing as of now.
Maybe you could fix it?

### alpha()

> Alpha beta.
```php
alpha(string $name, bool $flag): string|null
```

Example:

```php
$dummy = new Dummy;
$dummy->alpha('john', true);
// '...'
```

---
## Todo

Including but not limited to:
Expand Down

0 comments on commit f6f8537

Please sign in to comment.