clean/phpdoc-md

View on GitHub
tpl/github.class.phtml

Summary

Maintainability
Test Coverage
# <?= $this->className ?>  

<?= $this->classDescription->short ?>

<?php if ($this->classDescription->long) : ?>

<?= $this->classDescription->long ?>  
<?php endif ?>

<?php if ($interfaces = $this->interfaces): ?>
## Implements:
<?= join(', ', $interfaces); ?>
<?php endif ?>


<?php if ($this->parentClass): ?>
## Extend:

<?= $this->parentClass ?>
<?php endif ?>


## Methods

| Name | Description |
|------|-------------|
<?php foreach ($this->methods as $name => $info) : ?>
|[<?= $name ?>](#<?= strtolower($this->classShortName.$name) ?>)|<?= $info->shortDescription ?>|
<?php endforeach ?>

<?php if ($this->inheritedMethods): ?>
## Inherited methods

| Name | Description |
|------|-------------|
<?php foreach ($this->inheritedMethods as $name => $info) : ?>
<?php if (isset($info->doclink)): ?>
| [<?= $name ?>](<?= $info->doclink ?>) | <?= $info->shortDescription ?: '-' ?> |
<?php else: ?>
|<?= $name ?>|<?= $info->shortDescription ?: '-' ?>|
<?php endif ?>
<?php endforeach ?>
<?php endif ?>


<?php foreach ($this->methods as $name => $info) : ?>

### <?= $this->classShortName ?>::<?= $name ?>  

**Description**

```php
<?= $info->visibility ?> <?= $name ?> (<?= join(', ', $info->argumentsList) ?: 'void' ?>)
```

<?= $info->shortDescription ?> 

<?= str_replace("\n", "  \n", (string)$info->longDescription) ?> 

**Parameters**

<?php if (!$info->argumentsDescription) : ?>
`This function has no parameters.`
<?php else : ?>
<?php foreach ($info->argumentsDescription as $param) : ?>
* `(<?= $param->type ?>) <?= $param->name ?>`
<?php if (! empty(trim($param->desc))) : ?>
: <?= str_replace("\n", "  \n", $param->desc) ?>  
<?php endif ?>
<?php endforeach ?>
<?php endif ?>

**Return Values**

<?php if (!$info->returnValue) : ?>
`void`
<?php else : ?>
<?php foreach ($info->returnValue as $param) : ?>
`<?= $param->type ?>`

<?php if (! empty(trim($param->desc))) : ?>
> <?= str_replace("\n", "  \n", $param->desc) ?>
<?php endif ?>

<?php endforeach ?>
<?php endif ?>

<?php if ($info->throwsExceptions) : ?>

**Throws Exceptions**

<?php foreach ($info->throwsExceptions as $param) : ?>

`<?= $param->type ?>`
<?php if (! empty(trim($param->desc))) : ?>
> <?= str_replace("\n", "  \n", $param->desc) ?>
<?php endif ?>

<?php endforeach ?>
<?php endif ?>

<hr />

<?php endforeach ?>