@@ -70,37 +70,49 @@ |
||
| 70 | 70 | $tags = $docBlock->getTagsByName($tag); |
| 71 | 71 | switch ($tag) { |
| 72 | 72 | case 'return': |
| 73 | - if (sizeof($tags) === 0) continue; |
|
| 73 | + if (sizeof($tags) === 0) { |
|
| 74 | + continue; |
|
| 75 | + } |
|
| 74 | 76 | /** @var Return_ $return */ |
| 75 | 77 | $return = $tags[0]; |
| 76 | 78 | $this->addIndentMultiline($indent, ':returns: ' . $return->getType() . ' ' . $return->getDescription(), true); |
| 77 | 79 | break; |
| 78 | 80 | case 'throws': |
| 79 | - if (sizeof($tags) === 0) continue; |
|
| 81 | + if (sizeof($tags) === 0) { |
|
| 82 | + continue; |
|
| 83 | + } |
|
| 80 | 84 | /** @var Throws $return */ |
| 81 | 85 | $return = $tags[0]; |
| 82 | 86 | $this->addIndentMultiline($indent, ':throws: ' . $return->getType() . ' ' . $return->getDescription(), true); |
| 83 | 87 | break; |
| 84 | 88 | case 'since': |
| 85 | - if (sizeof($tags) === 0) continue; |
|
| 89 | + if (sizeof($tags) === 0) { |
|
| 90 | + continue; |
|
| 91 | + } |
|
| 86 | 92 | /** @var Since $return */ |
| 87 | 93 | $return = $tags[0]; |
| 88 | 94 | $this->addIndentMultiline($indent, ':since: ' . $return->getVersion() . ' ' . $return->getDescription(), true); |
| 89 | 95 | break; |
| 90 | 96 | case 'deprecated': |
| 91 | - if (sizeof($tags) === 0) continue; |
|
| 97 | + if (sizeof($tags) === 0) { |
|
| 98 | + continue; |
|
| 99 | + } |
|
| 92 | 100 | /** @var Deprecated $return */ |
| 93 | 101 | $return = $tags[0]; |
| 94 | 102 | $this->addIndentMultiline($indent, ':deprecated: ' . $return->getVersion() . ' ' . $return->getDescription(), true); |
| 95 | 103 | break; |
| 96 | 104 | case 'see': |
| 97 | - if (sizeof($tags) === 0) continue; |
|
| 105 | + if (sizeof($tags) === 0) { |
|
| 106 | + continue; |
|
| 107 | + } |
|
| 98 | 108 | /** @var See $return */ |
| 99 | 109 | $return = $tags[0]; |
| 100 | 110 | $this->addIndentMultiline($indent, ':see: ' . $return->getReference() . ' ' . $return->getDescription(), true); |
| 101 | 111 | break; |
| 102 | 112 | case 'license': |
| 103 | - if (sizeof($tags) === 0) continue; |
|
| 113 | + if (sizeof($tags) === 0) { |
|
| 114 | + continue; |
|
| 115 | + } |
|
| 104 | 116 | /** @var DocBlock\Tags\BaseTag $return */ |
| 105 | 117 | $return = $tags[0]; |
| 106 | 118 | $this->addIndentMultiline($indent, ':license: ' . $return->getDescription(), true); |
@@ -64,16 +64,18 @@ |
||
| 64 | 64 | $args = substr($args, 0, -2); |
| 65 | 65 | $this->addIndentLine(1, '.. php:method:: '.$method->getName().'('.$args.')'); |
| 66 | 66 | $this->addLine(); |
| 67 | - if ($docBlock) |
|
| 68 | - $this->addIndentMultiline(2, $docBlock->getDescription()); |
|
| 67 | + if ($docBlock) { |
|
| 68 | + $this->addIndentMultiline(2, $docBlock->getDescription()); |
|
| 69 | + } |
|
| 69 | 70 | $this->addLine(); |
| 70 | 71 | |
| 71 | 72 | if (!empty($params)) { |
| 72 | 73 | foreach ($method->getArguments() as $argument) { |
| 73 | 74 | /** @var Param $param */ |
| 74 | 75 | $param = $params[$argument->getName()]; |
| 75 | - if ($param !== null) |
|
| 76 | - $this->addIndentMultiline(2, ':param ' . $param->getType() . ' $' . $argument->getName() . ' ' . $param->getDescription()); |
|
| 76 | + if ($param !== null) { |
|
| 77 | + $this->addIndentMultiline(2, ':param ' . $param->getType() . ' $' . $argument->getName() . ' ' . $param->getDescription()); |
|
| 78 | + } |
|
| 77 | 79 | } |
| 78 | 80 | } |
| 79 | 81 | |
@@ -104,7 +104,9 @@ |
||
| 104 | 104 | foreach ($method->getArguments() as $argument) { |
| 105 | 105 | /** @var Param $param */ |
| 106 | 106 | $param = $params[$argument->getName()]; |
| 107 | - if ($param !== null) $this->addIndentMultiline(2, ':param ' . $param->getType() . ' $' . $argument->getName() . ': ' . $param->getDescription(), true); |
|
| 107 | + if ($param !== null) { |
|
| 108 | + $this->addIndentMultiline(2, ':param ' . $param->getType() . ' $' . $argument->getName() . ': ' . $param->getDescription(), true); |
|
| 109 | + } |
|
| 108 | 110 | } |
| 109 | 111 | foreach ($docBlock->getTags() as $tag) { |
| 110 | 112 | $this->addDocblockTag(2, $tag->getName(), $docBlock); |
@@ -71,7 +71,9 @@ discard block |
||
| 71 | 71 | $files = new \RecursiveIteratorIterator($dir); |
| 72 | 72 | |
| 73 | 73 | foreach ($files as $file) { |
| 74 | - if ($file->isDir()) continue; |
|
| 74 | + if ($file->isDir()) { |
|
| 75 | + continue; |
|
| 76 | + } |
|
| 75 | 77 | try { |
| 76 | 78 | $interfaceList[] = new LocalFile($file->getPathname()); |
| 77 | 79 | } catch (\Exception $e) { |
@@ -102,8 +104,9 @@ discard block |
||
| 102 | 104 | public function createDirectoryStructure() { |
| 103 | 105 | foreach ($this->project->getNamespaces() as $namespace) { |
| 104 | 106 | $namespaceDir = $this->dstDir . str_replace("\\", "/", $namespace->getFqsen()); |
| 105 | - if (is_dir($namespaceDir)) |
|
| 106 | - continue; |
|
| 107 | + if (is_dir($namespaceDir)) { |
|
| 108 | + continue; |
|
| 109 | + } |
|
| 107 | 110 | if (!mkdir($namespaceDir, 0755, true)) { |
| 108 | 111 | throw new \Exception('Could not create directory '. $namespaceDir); |
| 109 | 112 | } |