@@ -65,13 +65,13 @@ |
||
| 65 | 65 | */ |
| 66 | 66 | private static function filesFromDirectory(string $directory, array &$results = array()): array { |
| 67 | 67 | $files = scandir($directory); |
| 68 | - foreach($files as $value) { |
|
| 68 | + foreach ($files as $value) { |
|
| 69 | 69 | $path = realpath($directory . DIRECTORY_SEPARATOR . $value); |
| 70 | - if(!is_dir($path)) { |
|
| 70 | + if (!is_dir($path)) { |
|
| 71 | 71 | if (pathinfo($path, PATHINFO_EXTENSION) === 'php') { |
| 72 | 72 | $results[] = new \phpDocumentor\Reflection\File\LocalFile($path); |
| 73 | 73 | } |
| 74 | - } else if($value != '.' && $value != '..') { |
|
| 74 | + } else if ($value != '.' && $value != '..') { |
|
| 75 | 75 | self::filesFromDirectory($path, $results); |
| 76 | 76 | } |
| 77 | 77 | } |
@@ -88,9 +88,9 @@ discard block |
||
| 88 | 88 | * @throws \Mpdf\MpdfException |
| 89 | 89 | */ |
| 90 | 90 | private function writeHeader(string $name, string $summary, string $description): void { |
| 91 | - $this->WriteHTML(file_get_contents($this->templatesPath . '/styles.css'),\Mpdf\HTMLParserMode::HEADER_CSS); |
|
| 91 | + $this->WriteHTML(file_get_contents($this->templatesPath . '/styles.css'), \Mpdf\HTMLParserMode::HEADER_CSS); |
|
| 92 | 92 | $this->SetHeader('Generated with <a href="https://github.com/lluiscamino/phpDoc2pdf">phpDoc2pdf</a>'); |
| 93 | - $this->html .= $this->templatesEngine->render('header', array ('name' => $name, 'summary' => $summary, 'description' => $description)); |
|
| 93 | + $this->html .= $this->templatesEngine->render('header', array('name' => $name, 'summary' => $summary, 'description' => $description)); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -108,10 +108,10 @@ discard block |
||
| 108 | 108 | $constants_['public'] .= '<a href="#constant:' . $constant->getName() . '">' . $constant->getName() . '</a><br>'; |
| 109 | 109 | } |
| 110 | 110 | foreach ($properties as $property) { |
| 111 | - $properties_[strval($property->getVisibility())] .= '<a href="#property:' .$property->getName() . '">$' .$property->getName() . '</a><br>'; |
|
| 111 | + $properties_[strval($property->getVisibility())] .= '<a href="#property:' . $property->getName() . '">$' . $property->getName() . '</a><br>'; |
|
| 112 | 112 | } |
| 113 | 113 | foreach ($methods as $method) { |
| 114 | - $methods_[strval($method->getVisibility())] .= '<a href="#method:' .$method->getName() . '">' .$method->getName() . '</a><br>'; |
|
| 114 | + $methods_[strval($method->getVisibility())] .= '<a href="#method:' . $method->getName() . '">' . $method->getName() . '</a><br>'; |
|
| 115 | 115 | } |
| 116 | 116 | $this->html .= $this->templatesEngine->render('summary', array('methods' => $methods_, 'properties' => $properties_, 'constants' => $constants_)); |
| 117 | 117 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | <?php |
| 3 | 3 | $parsedown = new \Parsedown(); |
| 4 | 4 | foreach ($properties as $property) { |
| 5 | - $summary = ($property->getDocBlock() !== null && $property->getDocBlock()->getSummary() !== '') ?$property->getDocBlock()->getSummary() . '<br>' : ''; |
|
| 5 | + $summary = ($property->getDocBlock() !== null && $property->getDocBlock()->getSummary() !== '') ? $property->getDocBlock()->getSummary() . '<br>' : ''; |
|
| 6 | 6 | $description = ($property->getDocBlock() !== null && $property->getDocBlock()->getDescription() !== '') ? $parsedown->text($property->getDocBlock()->getDescription()) : ''; |
| 7 | 7 | $type = ($property->getDocBlock() !== null && $property->getDocBlock()->hasTag('var')) ? explode(' ', $property->getDocBlock()->getTagsByName('var')[0]->render(), 2)[1] : ''; |
| 8 | 8 | $separator = $type !== '' ? ': ' : ''; |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | <h3> |
| 11 | 11 | <a name="property:<?php echo $property->getName() ?>">$<?php echo $property->getName() ?> (<?php echo $property->getVisibility() ?>)</a> |
| 12 | 12 | </h3> |
| 13 | - <pre>$<?php echo $property->getName() . $separator . $type ?></pre> |
|
| 13 | + <pre>$<?php echo $property->getName() . $separator . $type ?></pre> |
|
| 14 | 14 | <i><?php echo $summary ?></i> |
| 15 | 15 | <?php echo $description . ($type !== '' ? ('<h4>Type</h4>' . $type) : ''); |
| 16 | 16 | } |
| 17 | 17 | \ No newline at end of file |